I'm having issues with matching text using regex in a spec file. Specifically I'm trying to match the string with an endash character. I've verified the regex works using
http://regexr.com/ and
http://www.regexplanet.com/advanced/java/index.html
Problem string: $92.45–$128.88
Regex: "\\$[0-9]+.[0-9]+\\u2013\\$[0-9]+.[0-9]+"
Spec code:
text matches "\\$[0-9]+.[0-9]+\\u2013\\$[0-9]+.[0-9]+"
Error message:
"priceText" text is "$74.95?$129.95" but should match "($[0-9]+.[0-9]+\u2013$[0-9]+.[0-9]+)"
The question mark is likely due to cmder on windows not parsing the endash well.