Is it guaranteed that the compression method field will never nest a space, like "LZW cmp" or something?
yes, I think it's always one word (and probably specifically for easy parsing, judging by the odd names).
When building a regexp against sample data my approach tends to be exactly the opposite of Fletch's
I call the two approaches "Extraction" (/:.{15}(.*)/) and "Validation" (your's). Which I use is determined by the situation. Sometimes, there's a happy middle that's a mixture of both (Fletch's /[[:hexdigit:]]{8}\s+(.*)$/).
In reply to Re^3: Regular Expressions Matching with Perl
by ikegami
in thread Regular Expressions Matching with Perl
by nimdokk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |