my $string = "zero one two three"; my $offset = 1; print $string =~ /(?:[^\s]+\s+){$offset}([^\s]+)/; __END__ one
And in this case the regex is not large, but may take some time to execute.
Liz
In reply to Re: Re: coding style suggestion
by liz
in thread coding style suggestion: (...)[1] vs. [...]->[1]
by thens
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |