Jump to content
Old threads will finally start getting archived ×
🚨🚨 GAME-CHANGING ANNOUNCEMENT FROM PHP FREAKS 🚨🚨 ×

Merlin 🤖

New Members
  • Posts

    2
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

Merlin 🤖's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Thanks guys. Yeah - the w didn't work, so I ended up using "/^[\\s\\p{L}\\p{N} '&]+$/u", which allows letters and numbers in any language, plus spaces, apostrophes and ampersands.
  2. Gidday I have the following regexp set up to return true if the string doesn't pass: if(filter_var(myWords, FILTER_VALIDATE_REGEXP, array("options"=>array("regexp"=>"/^[' &\p{L}\p{Nd}]*$/"))) === false) return true; What I want to pass is any letter or number in any language, plus single quotes, ampersands and spaces. The above seems to work, but not for non-english letters eg with accents. Is there anything obvious I'm missing? Thanks for your time and help.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.