E
Evan
Hi guys,
This is a scaled down version of my work
I have a long string
$PASSENGERS ="Tom Departure Newark Arrives Sanfrasico FLIGHT_STATUS2
MORNING FLIGHT DEPARTS FROM DANE REACHES NEWARK AFTERNOON LEAVES
NEWARK AND REACHES SAN FRANSISCO NEXT MORNING"
I have multiple patterns to search within each string defined in a
separate file.
Departure|Arrival
MORNING|AFTERNOON
Need to search for the occurence and position of pattern 1, if found,
search for the occurence and position of pattern 2 and so on. The
search for reasons needs to be done in a backward direction.
Looked at rindex. It searches the string right to left but the problem
using it is that the string cannot be a regexp.
So the only option remains is to use a regexp.
Could anyone suggest any ideas in the direction of approaching this
problem.
- Evan
This is a scaled down version of my work
I have a long string
$PASSENGERS ="Tom Departure Newark Arrives Sanfrasico FLIGHT_STATUS2
MORNING FLIGHT DEPARTS FROM DANE REACHES NEWARK AFTERNOON LEAVES
NEWARK AND REACHES SAN FRANSISCO NEXT MORNING"
I have multiple patterns to search within each string defined in a
separate file.
Departure|Arrival
MORNING|AFTERNOON
Need to search for the occurence and position of pattern 1, if found,
search for the occurence and position of pattern 2 and so on. The
search for reasons needs to be done in a backward direction.
Looked at rindex. It searches the string right to left but the problem
using it is that the string cannot be a regexp.
So the only option remains is to use a regexp.
Could anyone suggest any ideas in the direction of approaching this
problem.
- Evan