View previous topic :: View next topic
|
Author |
Message |
sundar_er
New User
Joined: 20 Dec 2006 Posts: 5 Location: india
|
|
|
|
Hi ..
I wanted to search the record for a particular pattern .Is there any function in rexx which will serve my purpose .
The pattern which iam interested is "-1234567-"
The pattern will have hypen followed by some 6 or 7 digits number and a hypen ... |
|
Back to top |
|
|
amolj
New User
Joined: 08 Nov 2006 Posts: 21 Location: india
|
|
|
|
hi ...
can u define the exact format for the record ...
we can search for a string within a string by using INDEX ...
also we can search for string directly in the dataset by using ISREDIT command
"ISREDIT F FIRST"(string to be searched) |
|
Back to top |
|
|
ofer71
Global Moderator
Joined: 27 Dec 2005 Posts: 2358 Location: Israel
|
|
|
|
Something like that?
Code: |
/* REXX */
A = '-1234567-'
IF DATATYPE(STRIP(A,"B","-"),'W') & LENGTH(STRIP(A,"B","-")) = 7 THEN
SAY 'MATCH'
ELSE
SAY 'MISMATCH'
EXIT
|
O. |
|
Back to top |
|
|
|