Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Split Strings 2

Status
Not open for further replies.

susiesunshine

Technical User
Mar 28, 2002
34
US
I would like to grab the name from an email address:
CN=John Doe/OU=CLE/OU=MS

How do I split it so I only display John Doe?
 
Something like like this will work for you:

Code:
stringvar myString := "CN=John Doe/OU=CLE/OU=MS";
split(replace(myString,"=","/"),"/")[2]

~Brian
 
Or use:

mid({table.field},instr({table.field},"=")+1,
instr({table.field},"/")-instr({table.field},"="))

Or if the CN= is static:

mid({table.field},4,instr({table.field},"/")-3))

The split is the way I would normally do it just cuz it's fun, but if you've an old version of CR it doesn't support it, either way works in newer versions though.

Please post the version of your software when requesting technical assistance.

-k
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top