All I want to do is swap any number of spaces (the first 2) with ":"$line =~ s/.{2}\s+/:/;
Any idea what I'm doing wrong?$line = 'this has three spaces'; #before $line = 'this:has:three spaces'; #after
In reply to simple regex problem by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |