91
rated 0 times
[
95]
[
4]
/ answers: 1 / hits: 64622
/ 13 Years ago, fri, june 17, 2011, 12:00:00
First of all, here is my code snippet:
var str = '<!--:de-->some german text<!--:--><!--:en-->some english text<!--:-->';
var match = str.match(/de-->([^<]+).+?en[^>]+>([^<]+)/i);
var textInDe = match[1];
var textInEn = match[2];
I've got this regex validation (thanks to The Mask) which works great.
Now, I want to check with an if-statement if this regex applies to some string or not.
I'm using Javascript jquery.
Thanks in advance :)
More From » jquery