On Wed, May 14, 2003 at 03:07:05PM -0700, Edward Peschko wrote: Sorry, I could not guess what you have in mind... Yours, Ilya > I'd like to be able to define a coderef that looks like the following: > > my $_coderef = sub { my ($text) = @_; > # text starts from position at which regular expression last > # matched. > # do something with $text, including regular expressions to modify > # pos($text); > # change pos so that the regular expression 'picks up' where the > # sub left off (ie: pos). > } > > Then people could write stuff to do particularly difficult regular expressions using > Inline::C, and you could say: > > if ($varb =~ m"($balanced_parens)") # is a C call. > { > > } > > which IMO is far more intuitive (and cleaner) than anything to do with (?...). > > EdThread Previous | Thread Next