Javascript regular expression: [\b] |
<input type="button" value="Match" onclick="javascript:demo('aaa\u0008ccc');return false;" /> <input type="button" value="No Match" onclick="javascript:demo('aaaccc');return false;" /> <script type="text/javascript" language="JavaScript"> //<![CDATA[ function demo(text) { var re = /[\b]/; if (text.match(re)) { alert("match"); } else { alert("no match"); } } //]]> </script> Note: Backspace = /u0008 |