SPUG: The Regexp of Infinitude.

Stuart Poulin stuart_poulin at yahoo.com
Fri Aug 6 19:07:23 CDT 1999


One trick is to hide the escaped \# before doing the match, then unhide them
after.

# Warning - Untested

$_ =~ s{\\#}{\\\0377}g;
# Do some match but don't worry about \# since you've hid it.
my ($buffer) = m{#(.*)#/};
# Now undo the hiding:
$buffer =~ s{\\\0377}{\\#}g;


--- Ken McGlothlen <mcglk at serv.net> wrote:
> For reasons which, I'm afraid, are going to be obscure at the moment, I have
> the following line in my Perl script:
> 
> 	$buffer =~ m#^(\043(.*?[^\\])*?)(\043/\})(.*)#s;
> 
> Basically, this should be interpreted as
> 

_____________________________________________________________
Do You Yahoo!?
Bid and sell for free at http://auctions.yahoo.com


 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    POST TO: spug-list at pm.org        PROBLEMS: owner-spug-list at pm.org
 Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/
 SUBSCRIBE/UNSUBSCRIBE: Replace ACTION below by subscribe or unsubscribe
        Email to majordomo at pm.org: ACTION spug-list your_address





More information about the spug-list mailing list