Javascript Regex: "Any word" pattern -
in jasmine test, trying set match fit expressions like:
'request <any_word> <any_word> - open actions menu'.
however, it's not being possible line, javascript doc says \\w regex word:
expect(item.geticontooltip()).tomatch('request \\w \\w - open actions menu'); any hint?
use + repeat previous token 1 or more times. \\w alone match single word character only.
expect(item.geticontooltip()).tomatch('request \\w+ \\w+ - open actions menu');
Comments
Post a Comment