Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: Regular Expression Search

by trizen (Friar)
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 ---------------


Comment on Re: Regular Expression Search
Download Code

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 examining the Monastery: (16)
As of 2014-07-11 18:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    When choosing user names for websites, I prefer to use:








    Results (234 votes), past polls