Regular Expression to find Html tags is not working properly in Chrome
Hello,
I Use the regular expression to find the html tags present in the input box, It works properly in IE & FF
but in chrome it works fine when use first time for an input box but not again,
below my code...
- function IsWithinTags(inputString) {
var regExp = /<\/?[^>]+(>|$)/g;
inputString = inputString.replace(/&(lt|gt);/g, function (strMatch, p1) {
return (p1 == "lt") ? "<" : ">";
});
return (regExp.test(inputString));
}
Give me suggestion,
Thanks in advance,
Ramesh