in reply to Re(3): parsing comments in newline-delimited files as lists
in thread parsing comments in newline-delimited files as lists
You don't need to remove whitespace preceding the comment, because it will be removed from the final result by the regex matching only non-whitespace characters. I originally had the first regex the way you have it.
is incorrect: if the line contains more than one word, this will only match the first one; you are explicitly disallowing embedded whitespace. We need to match from the first non-whitespace character to the last non-whitespace character and should include all intervening characters (including embedded whitespace).
No, we don't. Re-read the original post: we need to match URL-encoded URLs. Encoded URLs have no whitespace characters. My code is correct.
http://www.nodewarrior.org/chris/
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re(5): parsing comments in newline-delimited files as lists
by dmmiller2k (Chaplain) on Dec 28, 2001 at 00:34 UTC |