Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: character location question

by ZlR (Chaplain)
on Mar 11, 2005 at 15:42 UTC ( [id://438690]=note: print w/replies, xml ) Need Help??


in reply to character location question

Hmm, i think :
my $s = "hello world, kill bill" ; print pos $s, " " while $s =~ /ll/g
... does almost what you want :)
It returns : 4 17 22
Maybe you need to substract the length of the string you locate ?

Hope this helps,

zlr

Replies are listed 'Best First'.
Re^2: character location question
by EchoAngel (Pilgrim) on Mar 11, 2005 at 16:32 UTC
    thanks!

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others learning in the Monastery: (3)
As of 2024-04-19 17:11 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found