Details
-
Bug
-
Status: Closed
-
Critical
-
Resolution: Fixed
-
Xporter Cloud 2.2.0
-
None
Description
Javascript regular expressions are not working.
Nothing is exported when trying to use regular expressions to find some content in a string.
Steps to reproduce:
- Use one of the following methods to find some content:
//find string inside brackets %{var des= 'aaa [abcdefg] ddd'; var regExp = /\[([^)]+)\]/; var matches = regExp.exec(des)[1]; matches;}
Expected Result: abcdefg
//find issue key in text %{var content = “gg PMAXS-12345 aaa”; var regExp =/PMAXS-\d+/g; var matches = regExp.exec(“gg PMAXS-12345 aaa”)[0]; matches;} //or %{var content = ‘gg PMAXS-12345 aaa’; var id = content.match(/PMAXS-\d+/g)[0]; ‘my result is ‘ + id;}
Expected Result: PMAXS-12345
Current Behavior: Nothing is exported