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!
*************************************************
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top