Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: Regular Expression Search

by trizen (Hermit)
on Feb 10, 2012 at 08:57 UTC ( #952954=note: print w/ replies, xml ) Need Help??


in reply to Regular Expression Search

while (<DATA>) { print; while (/-+/g) { printf "Found at %s\n", $-[0]+1 . ($+[0] != $-[0]+1 ? " to $+[ +0]" : ''); } } __DATA__ A-----B A----C---B A--B---C----D-E A-B--C---D----E ---------------

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://952954]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (16)
As of 2016-06-30 12:59 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My preferred method of making French fries (chips) is in a ...











    Results (395 votes). Check out past polls.