>Respected All. Need help in a small coding/command.
>I have following Data for example
>
>PS="F9 B ( A/P LONI\(BK\) TL SHRIRAMPU)31 588 w"
>PS="SX B X (A/P) 37 588 n"
>PS="F6 B ( (K) /A/P LONI\(BK\) (TL) SHRIRAMPU)31 588 w"
>
>I Need to Extract Data from PS in the following Manner for these three cases as follows
>
>F9 B ( A/P LONI\(BK\) TL SHRIRAMPU)
>SX B X (A/P)
>F6 B ( (K) /A/P LONI\(BK\) (TL) SHRIRAMPU)
>
>i.e I need Text from first Left Digit to the Last Right Digit Except "31 588 w"
>
>If I am using NEWPS=STREXTRACT((PS),'',')') I am getting result as
>
>F9 B ( A/P LONI\(BK\ and the rest of the part is ignored.
>
>Similarly for F6 B ( (K) /A/P LONI\(BK\) (TL) SHRIRAMPU) I am getting F9 B ( A/P LONI\(BK\
>
>I need the entire Text starting from Left "F" till the last Bracket i.e if
>
>PS="PS="F6 B ( (K) /A/P LONI\(BK\) (TL) SHRIRAMPU)31 588 w"
>
>I need
>
>F6 B ( (K) /A/P LONI\(BK\) (TL) SHRIRAMPU)
>
>Please Guide or provide Appropriate Syntax
>Regards
>Harsh
In your samples, you always remove the 8 last characters, is that always the case?
If so, this will do: ?left(ps,len(ps)-8)
If not, please provide some more realistic samples of what you have and what you want.