18 January 2026:


This forum is now archived and is in read-only mode. Please continue discussions on our improved new Sahi Pro Community forum.



Sahi Pro is an enterprise grade test automation platform which can automate web, mobile, API, windows and java based applications and SAP.

Regular Expression - escape sequence


""For characters that are usually treated specially, \ indicates that the next character is not special and should be interpreted literally.""

>>
The character \ does not escape the special character [ or ] in regular expression?
Example: - _assertExists(_heading5(/discover time\[1\]/i));

The actual value is DIScover time[1]. When I use above syntax, it's not working. I have tried /discover time\\[1\\]/i. Still it doesn't work.
Can you please let me know how to use \ character in order to escape the special interpretation of a special character?
Sign In or Register to comment.