[Perl-pad-users] Capturing matches of regular expressions with PerlPad
Status: Alpha
Brought to you by:
thiloplanz
From: Thilo P. <thi...@us...> - 2003-08-14 11:46:03
|
Hi all, I have been thinking how to improve the support of popular Perl features in PerlPad. I put together a new version with my current ideas on regular expressions: http://perl-pad.sourceforge.net/PerlPadCaptureRegEx.dmg It works like this: There is a new built-in function capture, which you can put in front of pattern matches, like > print "line $. matches ! \n" if capture /(\d+)/; In case capture() encounters a match, it will put the matched text, the text before, the text after, along with $1, $2 ... into a new TableView which you can see in the bottom drawer by clicking on the button "Patterns" (next to "Warnings"). You can capture() as often as you want in a single snippet. Please give it a try. Bug reports, questions and suggestions always welcome, Thilo |