in reply to Re: regex man they are tough
in thread regex man they are tough
This bit doesn't take into account not having 30 characters before the search string:
Since we know there must be 30 bytes of data before the Search String, do this:$idx = index( $line, "Search String", 16 );
The same idea is true for the "third_part" bit in your code and isn't hard to handle.$idx = index($line, "Search String", 16+30);
|
---|