i have regex code:
<script type="text/javascript">
var str = "kw-xr55und";
var patt1 = /[T|EE|EJU].*D/i;
document.write(str.match(patt1));
</script>
it can read:
str= "KD-R55UND" -> as UND
but if i type:
str= "kw-tc800h2und -> result tc-800h2und. //it makes script read T in front of 800
i want the result as UND
how to make the code just check at character behind the 800?
EDIT
After this code it can work:
<script type="text/javascript">
var str = "kw-tc800h2und";
var patt1 = /[EJTUG|]\D*D/i;
document.write(str.match(patt1));
</script>
but show next problem, i can show the result if:
str= "kw-tc800un2d"
i want result like -> UN2D