You are having trouble because : is not a 'word character' -- see Using character classes in perlretut. Easiest solution would be to remove the s modifier (Modifiers) and use .+, which will match every character except a newline (once you remove s).
#11929 First ask yourself `How would I do this without a computer?' Then have the computer do it the same way.
In reply to Re: parsing a line
by kennethk
in thread parsing a line
by kurtcobain
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |