in reply to Identifying the position of match using regular expressions

Look at the special variables @- and @+.

  • Comment on Re: Identifying the position of match using regular expressions