Hard Light Productions Forums
Off-Topic Discussion => Programming => Topic started by: Fury on February 18, 2011, 04:53:02 am
-
I have this one config file where I need to use perl regular expressions, preferably the lookahead assertion.
A normal include syntax would be like this:
"\.(php|cgi|pl|shtml|shtm|html|htm)$"
And exclude syntax using lookahead from what I've understood should be like this:
"^(?!\.php|?!\.cgi|?!\.pl|?!\.shtml|?!\.shtm|?!\.html|?!\.html)"
Is this correct?
-
Never mind. I figured out something else that didn't involve regular expressions at all.