Home  >  Article  >  Web Front-end  >  Search for vertical tab characters using JavaScript's RegExp

Search for vertical tab characters using JavaScript's RegExp

WBOY
WBOYforward
2023-09-02 15:01:051158browse

Search for vertical tab characters using JavaScripts RegExp

To find the vertical tab character using JavaScript regular expression, please use the following code:

\v

Example

You can try running the following Code to find vertical tab characters. It returns the position where the vertical tab (\v) character is found -

<html>
   <head>
      <title>JavaScript Regular Expression</title>
   </head>
   <body>
      <script>
         var myStr = "Secure and \v Responsive!";
         var reg = /\v/;
         var match = myStr.search(reg);

         document.write(match);
      </script>
   </body>
</html>

The above is the detailed content of Search for vertical tab characters using JavaScript's RegExp. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:tutorialspoint.com. If there is any infringement, please contact admin@php.cn delete