No such thing as a small change | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
Obviously, this is written by someone who thinks all strings must be doube-quoted in Perl! And consequentely he put double quote around the regex. Not only this is not necessary, it actually breaks the regex.
Most probably, it was meant to be: Which means: match a string starting with 'abc', followed by either a capital 'A' or a backspace, followed by 'def' which ends the string. Please note that normally \b in a regex means "match on a word boundary", but inside a character class (the square brackets) it means 'backspace'. CountZero A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James In reply to Re: What it mathches`
by CountZero
|
|