Re: can a regex pattern match return the starting position of the match?

2011-04-17 Thread ka_zim35
...@visioninfosoft.com Cc: perl-win32-users@listserv.activestate.com Sent: Thursday, April 14, 2011 2:08 PM Subject: Re: can a regex pattern match return the starting position of the match? Greg- This question was answered on Stack Overflow: http://stackoverflow.com/questions/87380/how-can-i-find

can a regex pattern match return the starting position of the match?

2011-04-14 Thread Greg Aiken
given how smart perl is, I was thinking there must be a function within perl whereby if one does a pattern match against a scaler, that in addition to having regex being able to return such built in vars as: $` (what preceeds the match), $' (what follows the match), $1, etc. is there a built

Re: can a regex pattern match return the starting position of the match?

2011-04-14 Thread Conor
Greg- This question was answered on Stack Overflow: http://stackoverflow.com/questions/87380/how-can-i-find-the-location-of-a-regex-match-in-perl http://stackoverflow.com/questions/87380/how-can-i-find-the-location-of-a-regex-match-in-perlbrian d foy's answer seems to be the best: The built-in