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 derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Extracting a name from string text field (Delimiters)

Status
Not open for further replies.

Debug44

Technical User
Jan 12, 2004
19
US
I need to extract the proper name on a field where the string data looks like below...
(Using Crystal 10)

Example
{unit.operator} returns
"cn= Alan Mathis/OU=Waco/O=WEB" or
"cn= Anthony Winkelmann/OU=Waco/O=WEB"

I need it to extract the proper name.
Preceding the name is always "cn= " and is always followed by "/'.
Tried the mid and trim functions and even the split function.
Split returns the error message "a formula can not result in an array"

Any help would be appreciated...Thanks
Bart
 
instr({unit.operator},"/") returns position of the /

use mid

mid({unit.operator},4, (instr({unit.operator},"/")-1))

Ian
 
Worked Great...thanks a million for the fast reply, Ian.

Bart
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top