HTML Editor
<!DOCTYPE html> <html lang="en-US"> <body> <p>Click the button to return the position where the tab character was found in a string.</p> <button onclick="myFunction()">Click me</button> <p id="point"></p> <script> function myFunction() { var str = "His style Is Who is he \tIS"; var pattern = /\t/; var result = str.search(pattern); document.getElementById("point").innerHTML = result; } </script> </body> </html>
OUTPUT
×

Save as Private