Ben Elliston 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.
Any objections if I go through and clean up a bunch of these?
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.
-- Jacob
_______________________________________________
DejaGnu mailing list
DejaGnu@gnu.org
https://lists.gnu.org/mailman/listinfo/dejagnu