I want everything removed from the first occurence of whatever my word is, in the example above it is TEST. I know there must be a way to do this without having to subsitute the word back in, right? Can you help me?$data =~ s/.+TEST/TEST/;
In reply to How do you make a regex non greedy by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |