Find a form feed character with JavaScript RegExp.

HTMLJavascriptProgramming Scripts

To find a form feed character with JavaScript Regular Expression, use the following −

\f

Example

You can try to run the following code to find a form feed character. It returns the position where the form feed (\f) character is found −

<html>
   <head>
      <title>JavaScript Regular Expression</title>
   </head>
   <body>
      <script>
         var myStr = "100% \f Responsive!";
         var reg = /\f/;
         var match = myStr.search(reg);
         
         document.write(match);
      </script>
   </body>
</html>
raja
Published on 26-Feb-2018 06:50:24
Advertisements