Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: Regular Expression Search

by InfiniteSilence (Curate)
on Feb 09, 2012 at 18:43 UTC ( #952809=note: print w/replies, xml ) Need Help??


in reply to Regular Expression Search

~linux>perl -e '$BEGIN{my @found = ()}; $foo = q|A--B|; while($foo=~m/ +\-/g){push @found,@+}; END{print qq|found at $found[0] to $found[$#fo +und]|}'
Prints
found at 2 to 3

Celebrate Intellectual Diversity

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://952809]
help
Chatterbox?
[1nickt]: My lads are 15 and 31 now and both drive me just as crazy as when little, just less frequently.
[LanX]: ;p
[marto]: LanX I'd rather commit sudoku :P
[marto]: trench humour folks, feeling rough.
[marto]: there is never a night when they sleep all the way through, but last night was something else
[marto]: gave in at 3:45 ish and let Charlie watch videos about spitfires, the battle of Britain. He's plane crazy
[1nickt]: marto soothing!
[marto]: Hiromi makes an appearance, let's hope Jools doesn't ruin it by joining in on the old Joanna

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (7)
As of 2017-11-18 18:51 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    In order to be able to say "I know Perl", you must have:













    Results (277 votes). Check out past polls.

    Notices?