Perl RegEx for a single word

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Frank Hagan
    Senior Member
    • Mar 2004
    • 724

    Perl RegEx for a single word

    I'm trying to add a challenge word to the registration page of a customer's Joomla installation, and you can have a Perl Regular Expression to validate a field. But I'm not having any success getting the regular expression to work.

    The challenge word is "Mandala" ... with the prompt "Type 'Mandala' in the box to prove you are a human". The regular expressions I have tried are:

    Mandala
    ^Mandala$
    ^Mandala$.
    ^[M][a][n][d][a][l][a]$ (and also without the ^ and $ characters.

    So far, no joy. What is the regular expression to match a specific word like "Mandala"?
  • Frank Hagan
    Senior Member
    • Mar 2004
    • 724

    #2
    Got it ... the regular expression that Joomla accepted was "/^Mandala/"

    Comment

    • ZYV
      Senior Member
      • Sep 2005
      • 315

      #3
      Yup, because it's Perl...

      Comment

      Working...