String Comparison using Regex in RPE
We are using RPE 7.0.
Using regex, wanted to check if a string ends with xx.0; where x will be an Integer.
var test123 = "Version 11.0";
_sessionLogger.info ("REGEX INDEX OF: " + test123.indexOf(" [0-9]*.0$"));
Second line returns -1. While expected result is 8.
-1 is expected when
How to use regex in RPE for string comparison.test123 = "Version x1.0"
test123 = "Version"
Comments
Ralph Schoon
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER Sep 19 '22, 3:08 a.m.There are a lot of resources around, that explain how Regex works in the various languages. I would suggest to look there. It is probably too much to ask a forum to write the regex expression for you.