Created
June 23, 2015 12:24
-
-
Save devpruthvi/19bfd8d5a30c8a13b331 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| str = '[quote][quote]Hi[/quote] Hello[/quote]'; | |
| regexp = /\[quote\](.*)\[\/quote\]/; | |
| while(str.indexOf('[quote]') != -1) | |
| { | |
| str = str.replace(regexp,'<div class="quote">$1</div>'); | |
| } | |
| document.writeln(str); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment