i need your help with a regex in javascript.
I've got an a-tag with follow pattern
<a href='#'>
<!--:de-->some german text<!--:--><!--:en-->some english text<!--:-->
</a>
So, now i'm searching for a regular expression what extract me each part
1. <!--:de-->some german text<!--:-->
2. <!--:en-->some german text<!--:-->
Thanks VERY much in advance
Try this:
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];