vendredi 19 juin 2015

Javascript Regex: "Any word" pattern

In a Jasmine test, I am trying to set this match to fit with expressions like:

'Request <any_word> for <any_word> - Open actions menu'.

However, it's not being possible with this line, but Javascript doc says that \\w is the regex for any word:

expect(item.getIconToolTip()).toMatch('Request \\w for \\w - Open actions menu');

Any hint?

Aucun commentaire:

Enregistrer un commentaire