Darkzaelus wrote:Sorry, was following the jack daniels cheat sheet
No problem.
Darkzaelus wrote:Doesn't seem to do any harm on my system, so i'll leave it as it is.
Err, what do you meant by "it doesn't do any harm"? Are you saying the regex '/^\>$/' or '/^\\>$/' sucsesfully matches the string '>'? I really doubt it. And even if it did, would you keep the incorrect syntax only because "it doesn't do any harm on YOUR system"? That is asking for trouble, IMO!
Last edited by prometheuzz on Sat Sep 27, 2008 4:02 pm, edited 1 time in total.
Why don't you just listen to prometheuzz and me, huh?
< and > alone are NOT any kind of regex metacharacter, so do NOT escape them. That cheatsheet you are talking about is WRONG.
If you do escape them, you run the risk of turning them into a metacharacter after all! Some regex flavors (e.g. GNU but not PCRE) interpret \< and \> as word boundaries. You don't want that to happen in your case. So do not escape them.