Substring and ()

  • Thread starter Thread starter shapper
  • Start date Start date
S

shapper

Hello,

I have a string which looks as follows:
"(e-mail address removed) (John Smith)"

How to create a substring with only the part which is between (), i.e.,
the name?

Thanks,

Miguel
 
There are a couple of ways:

1. Use a Regular Expression
2. Split the string on '(' and remove the ')' from the resulting string
3. Find the position of '(' and ')' with Regex or string search and
substring using these two values to get start and end.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA
http://gregorybeamer.spaces.live.com

*************************************************
Think outside of the box!
*************************************************
 
Back
Top