Rather than using a regular expression, you might want to consider using index to find the first occurance of your search pattern. If it is found within your initial range then you could follow Ratazong's advice and use substr to remove characters as required.
I hope this is helpful.
Cheers,
JohnGG
In reply to Re: how to search for a pattern in a string within a certain range
by johngg
in thread how to search for a pattern in a string within a certain range
by BhariD
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |