How can I get a javascript match text if I had some test example like :
someblablatext?someotherimportanttext
How can I capture everything after question mark sign (?). And alert it?
Was looking here didn’t find some examples on this type of expressions? do I need to use group matching for this. Never used regex in javascript so far I did in Java many times.
You don’t need regex for this. Simply use string.split() function, e.g.:
A while ago I heard that if you can use a string function instead of regex, then you probably should,. I did some benchmarking and it seems that string functions are very fast and in many cases faster than regexes (not talking about complex examples, just about something as simple as this).