Hi,

    I'm trying to retrieve a substring from a string, but I'm not sure exactly where 
and how big that substring is. The substring is delimited by a start and end special 
character. It was suggested to me to write two regular expression, one that would 
match everything up to and including the start special character, and one to match 
everything following and including the end special character, and replacing the 
matches with nothing.

    I thought finding the location of the start and end special characters, then 
calling substr().

And so I have to questions:
1 - How would I find the index for a particular character in a string?
2 - What's the best method, everything considered (simplicity, performance, etc).

Thanks for your time.

Nat

Reply via email to