Or if you want to only find the lines that have only one colon...@pairs = grep(/^([^:]+):(.*)/, <>);
/me loves grep@pairs = grep(/^([^:]+):([^:]+)$/, <>);
In reply to Re: Pulling out pairs
by how do i know if the string is regular expression
in thread Pulling out pairs
by andyw
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |