Try it
Javascript
Jquery
Angular
Learn Angular
Learn Javascript
Learn Bootstrap
Learn jQuery
Replace-3
Example of
replace with regex expression
:
<!DOCTYPE html> <html> <head> <title>Welcome to LearnKode - A code learning platform</title> </head> <body> <script> var regexp = /(\w+)\s(\w+)/; var str = 'Michael Voughan'; var result= str.replace(regexp , '$2, $1'); document.write(result) </script> </body> </html>
Output
×
Save This try
Title
Description
<p>Example of <code>replace with regex expression</code>:</p>