Clear questions and runnable code
get the best and fastest answer
Re: [Try-out] Regexp do's and don'tsby nobull (Friar)
|on Mar 27, 2005 at 22:13 UTC||Need Help??|
Good document. I can hardly fault it technically.
A few suggestions (I am a native speaker of (British) English):
"look how cute, he's telling the obvious."
"look how cute, he's stating the obvious."
to search global
to search globally
The plural of 'regex' is sometimes written as 'regexen'. This is not a standard way of making a plural in English but it still seen quite often.
The wisdom of using strictures and taint mode has little to do with regexes. The whole section "Rules of Thumb" should be introduced as general Perl programming advice not RE specific advice. Perhaps even split this section off to a separate node.
they are/behave malicious
Can't make this work comfortably in English. They are malicious or they behave maliciously.
Don't trust users.
...or programs under their control.
standing for president
Check if you enter the right airplane before entering it.
Check if you are entering the right airplane before you enter it.
if both are not present.
Sorry the precedence of 'not' here is ambiguous in written English. (In spoken English it would be possible to disambiguate with intonation).
($untainted) = $tainted =~ m/(.*)/g;
($untainted) = $tainted =~ m/(.*)/;
This way, you only show you don't know why one would use taint mode and you make taint mode useles for your script.
This could be considered insulting. There's nothing wrong with unconditionally untainting data that is known for certain to come from a trusted source.