On Sun, Dec 09, 2018 at 06:58:28PM -0600, Jacob Bachmeyer wrote: > > A lot of regular expressions in DejaGnu are complex for no good > > reason. This is because the regexps are placed inside quotes ("..") > > wich are processed before being passed to the relevant function (be it > > 'expect', 'regexp', 'regsub', etc). As long as the string is a > > constant, it is possible to put the regexp in braces and eliminate one > > additional level of backslash quoting. Here are a few examples from > > lib/telnet.exp. As you can see, the regexps become quite a bit > > clearer, even for these fairly simple cases.
> That is good for lib/telnet.exp, but some files, like > lib/dejagnu.exp and testsuite/runtests.all/libs.exp substitute > variables into the regexps. This is why I said "as long as the string is constant". ;-) For strings containing varaible substitutions, I don't think there is much we can do. Ben
signature.asc
Description: PGP signature
_______________________________________________ DejaGnu mailing list DejaGnu@gnu.org https://lists.gnu.org/mailman/listinfo/dejagnu