if _N_ = 1 then
pattern = "/koy|avenue|dr|drive|rd|road/i";
ExpressionID = prxparse(pattern);
input street $80.;
call prxsubstr(ExpressionID, street, position, length);
if position ^= 0 then
match = substr(street, position, length);
put match:$QUOTE. "found in " street:$QUOTE.;
153 Bagdat Caddesi
6789 64uncu Koy
4 Moritz Road
7493 Ulus Yolu
So main idea is at the bottom of the code there is my data set to be searched in and i have a pattern which will be searched in the dataset.
But my aim is to add a criteria to my code.
I want to search for the first word of the pattern in the first row of the dataset.
First pattern word matches? First row of the dataset
Second pattern word matches? Second row of the dataset
and so on.
How can i add a citeria like this to my existing code.
Could you please help me?