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

Extract certain information from a string

Status
Not open for further replies.

woodyinoz

IS-IT--Management
Jan 8, 2002
215
GB
Hi all,

I am using Crystal Reports 9.

I am looking to extract some information from the middle of a string field. The field alwys follows the following layout although the number of characters may differ.

884-007-P38-A34_A35

I want to return P38.

Another example would be 881-201B-M132-A34A_B34C where I would want to return M132.

Can anyone help with this?

Thanks in advance,

Woody
 
If the rule is that the characters always follow the second hyphen, then try:

split({table.string},"-")[3]

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top