Tuesday, April 04, 2006
PHP Regular Expressions vs. JavaScript
I have been doing a little work with the WikiMedia wiki parser. I'm trying a direct translation to JavaScript, with a few modifications. So far a potential problem I've seen is the use of the s and x flags in the PHP regular expressions, there are no equivalents to these in JavaScript. x doesn't seem to be a problem, since it does something that can be done by just editing the source code. However, s causes the . character to match newlines. This could be a problem. With any luck it won't break too many pages.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment