That fails on strings like "FIXEDfooFIXEDbarFIXED" without making any assumptions beyond the stated requirements. A greedy match seems right here.my ($result)= m{ FIXED (.*?) FIXED }x;
In reply to Re^2: Get middle word
by sauoq
in thread Get middle word
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |