|laziness, impatience, and hubris|
Re: Special Variables and Multiple Regexp Matchingby LanX (Canon)
|on Nov 18, 2013 at 00:30 UTC||Need Help??|
I'm not sure what your goal is...
We have to guess how '$token' and '$line' look like, and I have no idea why the (undemonstrated) while loop should not terminate.¹
But pos will tell you where the last match paused, the rest should be easily calculated with 'length($token)' (IF token is just a simple string)
¹) well except the fact that lc always creates a new string which resets the search-position. Simply lowercase once '$line' before you loop!
( addicted to the Perl Programming Language)