To find tab characters using JavaScript regular expressions, use the following command -
\t
You can try running the following code to find tab characters. It returns the location where the tab (\t) character is found -
<html> <head> <title>JavaScript Regular Expression</title> </head> <body> <script> var myStr = "Simple \t Responsive!"; var reg = /\t/; var match = myStr.search(reg); document.write(match); </script> </body> </html>
The above is the detailed content of Search for tab characters using JavaScript regex. For more information, please follow other related articles on the PHP Chinese website!