Reputation: 41
I am trying to match the string ending with a number "Invalid Version. Latest known Version is 110"
The regex matcher I used was:
"#regex ^.+\d+"
When running the test the output was:
actual: 'Invalid Version. Latest known Version is 110', expected: '#regex ^.+d+', reason: regex match failed
Upvotes: 1
Views: 211
Reputation: 41
This worked:
"#regex ^.+\\d+"
I missed that I need to put double backslash \\
.
Upvotes: 1