regular expression

  1. David Hallam

    XF 2.1 Regex Query

    Hi all, Newbie here:p I have a custom field added onto the user registration. I need to ensure they add only a Surname, followed by a comma, a space - then another name, and another - upto 100 characters all on one line Example = Hallam, Wilson, Harris, Crowder, Lane, Crisp, Naylor, Downs...
  2. SneakyDave

    How to apply regular expressions to unicode characters?

    I have a regular expression that replaces characters and numbers in a string. I use preg_replace and a regular expression of "/[a-z\d]/i" to do that. $newtext= preg_replace("/[a-z\d]/i", "x", $originaltext); Is there an easy way to extend that regex to include unicode characters? Edited to...
  3. Mr Lucky

    help with a currency regular expression please

    What I want is to match the value so a user must put in a currency symbol and amount I can do this with a specific currency, e.g. ^\£(\d{1,3}(\,\d{3})*|(\d+))(\.\d{2})?$ for £ However I want to allow $ and € as well (or ideally any currency symbol) Can someone please help with this? Thanks
Top