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

Extracting text

Status
Not open for further replies.

1chicken

Programmer
Jun 11, 2003
20
US
String= hi : how : are : you

Would like to extract text between x set of parentheses.

???
 
There aren't any parentheses?

To extract text between some standard delimiter, consider using a formula containing something like:

whileprintingrecords;
stringvar array MyArry := split("hi : how : are : you",":");
join (MyArry,"")

In CR 8.5 or less you'll be gated by a 254 character limit.

-k
 
Sorry, I meant :'s.
(You probably figured that out.

Actually looking to extract one of these words from between the :'s. Ex.

In each detail line the length of the string may be different, however, I want to extract the second word regardless of char length.

Thanks for your help.

Robb
 
The following should work:

whileprintingrecords;
stringvar array MyArry := split("hi : how : are : you",":");
myArray[2];



Software Sales, Training, Implementation and Support for Exact Macola, eSynergy, and Crystal Reports
 
While I'm at it, I may as well ask:

Is there a way to join rows of detail into one field in the group header? Ex.:

GH1=Animals
D=CAT
D=DOG
D=MOUSE

desired result:

GH1=Animals CAT DOG MOUSE

and thanks for your help on the others!


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top