this puts in $1 the first word of the string, where "word" means "the first sequence of letters ended by "]", " " or "_". Add other delimiters if needed. In the case of "]", it also checks for an optional leading "[".$teststring =~ /^[[]?([^] _]+)/;
In reply to Re: Problem with RegEx & various "endings"
by waldner
in thread Problem with RegEx & various "endings"
by timesink
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |