With JavaScript RegExp search a vertical tab character.


To find a vertical tab character with JavaScript Regular Expression, use the following −

\v

Example

You can try to run the following code to find a vertical tab character. 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>

Updated on: 23-Jun-2020

203 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements