Problems? Is your data what you think it is? | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
Hoi,
Good stuff! Has the potential be very useful for newbies. One point: "5. Don't use regexes for formats without a definite syntaxis, like human language. Regexes are good for pattern matching (and substitution), not for langague analyzing."Think you have to be a bit more specific here. Computer languages have a definte syntax but using regular expressions to parse them can be a very painful process. (I Know this from experience cause I once tried to make a code beautifier for C++ and Pascal). In those cases a proper parser (say Parse::RecDescent) is much better. If you are just trying to find simple things in source code, for instance #include statements or simply formatted comment blocks, regular expressions would be fine. Have Fun In reply to Re: [Try-out] Regexp do's and don'ts
by gumpu
|
|