Re: Oh, this bugs me no end!
Regular expressions are quite a puzzle the first time around.
Unfortunately, each program tends to have little exclusively different ways of doing things. For example, if one was matching "a.+b" (meaning from "a" to "b" with any number of characters between) in the string "adbcccbr", some programs will match "adb" some might match "adbcccb", others may match either, depending how you ask.
Regular expressions are very powerful. REXX does not support them natively, but there are always addins.
GREP supports regular expressions.
Take care with any program you work with. Many will try to break your file into "lines" if they see binary data that decodes to <CR>, <LF>, or any combination. Others will automatically declare a line break at some fixed number of characters. If a string for which you are scanning crosses one of these boundaries, the best outcome will be that you'll miss that string. You could end up with some extra line end characters in your file.
Some programs will have maximum string lengths which might seem generous at 65K, but if your file is longer than that, you can't do the obvious and read the whole thing into a string variable.
REXX can read by line or character.
Regular expressions are quite a puzzle the first time around.
Unfortunately, each program tends to have little exclusively different ways of doing things. For example, if one was matching "a.+b" (meaning from "a" to "b" with any number of characters between) in the string "adbcccbr", some programs will match "adb" some might match "adbcccb", others may match either, depending how you ask.
Regular expressions are very powerful. REXX does not support them natively, but there are always addins.
GREP supports regular expressions.
Take care with any program you work with. Many will try to break your file into "lines" if they see binary data that decodes to <CR>, <LF>, or any combination. Others will automatically declare a line break at some fixed number of characters. If a string for which you are scanning crosses one of these boundaries, the best outcome will be that you'll miss that string. You could end up with some extra line end characters in your file.
Some programs will have maximum string lengths which might seem generous at 65K, but if your file is longer than that, you can't do the obvious and read the whole thing into a string variable.
REXX can read by line or character.
Comment