Forum Discussion
rraghvani
3 years agoChampion Level 3
The plus '+' will match one or more consecutive 'e' characters.
function testit()
{
var str = "<div role=\"group\" aria-roledescription=\"offer\" aria-label=\"Fibre+ Gig Plan Card\" class=\"c-card c-card--odd-number-of-cards\">";
//var regEx = /Fibre+ Gig Plan Card/; // Not working because of '+'
var regEx = /Fibre\+\s.*/; // Working because of '\+'
var matches = str.match(regEx);
if (matches != null)
Log.Message("Found: '" + matches + "'");
else
Log.Message("Not found");
}
Use '\+' followed by '\s' in "...-label="Fibre\+\s.*']..."
Related Content
- 10 years ago
Recent Discussions
- 18 hours ago
- 18 hours ago
- 5 days ago