quote:
Originally posted by markee
If you want it to be case insensitive then use gi rather than just g.
I do not recommend using the case insensitive flag. Reason for this is simple: to be consistant with Messenger Plus!.
Tags in Messenger Plus! like (!VER) are case sensitive, so it is better to have that same behaviour in your scripts (just like I would recommend commands to start with "/" and not "!", "^", "$", or whatever else)
There is of course no rule which states you can't use the case insesitive flag, but it should be considered as one of the
guidelines in handling commands and tags...
See also
CookieRevised's reply to [Release] Change Me!
quote:
Originally posted by Agret
Heh, i've gotten somewhat used to regular expressions although they vary in usage. UltraEdit and PHP have different regular expressions and now I'll have to learn the JavaScript ones
I think it's better to just look up a cheat sheet for regular expressions rather than try and learn them, it'll drive you insane trying to remember which one to use between which language / program.
There isn't a fundamental difference between all the variations.
They all work the same. What can be different is that some variations can do more than others (eg: not all variations support back tracking), etc. But the overall way of usage is the same. And that and the logic behind it can be learned.
Once you know how regular expressions work, it is only a very small step to adapt your syntax slightly to accomodate the syntax of the language you're working in.
As for a cheat sheet, that's why there are easy to use help files with a syntax overview of regular expressions
In the
JScript Documentation, see:
- Contents > JScript > JScript User's Guide > Introduction to Regular Expressions > Regular Expression Syntax
or
- Index > regular expressions > syntax