in reply to Perl cheat sheet
A few nits with the regex bits (these are common traps, even for experts):
- The regex metacharacter ^ means "start of string", not "start of line" (unless the /m modifier is used)
- The regex metacharacter $ means "end of string", not "end of line" (unless the /m modifier is used)
- . is "any char except \n" or just "not \n" (unless the /s modifier is used)
A few possible additions:
- Regex "start of string" is \A
- Regex "end of string" is \Z
- Regex "absolute end of string (i.e. no trailing \n) is \z
- Another commonly ignored "NEVER" is: /$userinput/
In Section
Craft