Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: Re: Extract string from rear of string

by Aighearach (Initiate)
on Dec 28, 2001 at 02:46 UTC ( [id://134754]=note: print w/replies, xml ) Need Help??


in reply to Re: Extract string from rear of string
in thread Extract string from rear of string

Actually, it returns the position of the rightmost occurrence of a substring rather than a character. Though, you could use it to check for a substring that is only one character.
       rindex STR,SUBSTR,POSITION
       rindex STR,SUBSTR
               Works just like index() except that it returns the
               position of the LAST occurrence of SUBSTR in STR.
               If POSITION is specified, returns the last occur­
               rence at or before that position.

--
Snazzy tagline here
  • Comment on Re: Re: Extract string from rear of string

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (3)
As of 2024-04-20 03:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found