Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [titan-dev] Regular expression escaping in configuration file

Hi Harald,

Please try to double-escape (e.g. as in '\\$') the symbols in question; the config file is parsed in several layers.
Please let me know if it works(or does not) .

Best regards
Elemer





-----Original Message-----
From: titan-dev-bounces@xxxxxxxxxxx [mailto:titan-dev-bounces@xxxxxxxxxxx] On Behalf Of Harald Welte
Sent: Friday, July 14, 2017 11:21 PM
To: titan-dev@xxxxxxxxxxx
Subject: [titan-dev] Regular expression escaping in configuration file

Hi!

I'm using Eclipse Titan 6.2.0 and am currently playing with the TELNETasp TestPort.  This port requires the user to specify the prompt on the telnet server for use with "buffered" mode.  This works fine for a fixed prompt situation.  For variable prompts (such as those that change with context of where you are in the navigation of a MIB), one can specify regular expressions, e.g. using "REGEX_PROMPTn" variables.

However, as soon as want to use the '\' escaping character to include symbols like () or # in the prompt, the Titan test executor complains:

Parse error in configuration file `sysinfo/Test.cfg': in line 15, at or before token `\$': Invalid escape sequence in string literal.

Can somebody explain to me what is the correct method to escape in regex's spcified in the config file?

-- 
- Harald Welte <laforge@xxxxxxxxxxxx>           http://laforge.gnumonks.org/
============================================================================
"Privacy in residential applications is a desirable marketing option."
                                                  (ETSI EN 300 175-7 Ch. A6) _______________________________________________
titan-dev mailing list
titan-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit https://dev.eclipse.org/mailman/listinfo/titan-dev


Back to the top