Jump to content
  • Advertisement
Sign in to follow this  
gamerking

[web] Javascript help please?

This topic is 3613 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

function stripTags(s){
 s = s.replace(/<br \/>/gi,"\r");
 s = s.replace(/<br\/>/gi,"\r");
 s = s.replace(/
/gi,"\r"); s = s.replace(//gi,""); s = s.replace(/<\/i>/gi,""); s = s.replace(//gi,""); s = s.replace(/<\/b>/gi,""); s = s.replace(/
/gi,"
Quote:
"); s = s.replace(/<\/blockquote>/gi,"
"); s = s.replace(/

/gi,""); s = s.replace(/<\/p>/gi,""); s = s.replace(/<\/a>/gi,""); s = s.replace(/]*>/gi,"$1"); s = s.replace(/(.+?)<\/a>/gi,"$2"); s = s.replace(/<.*\/>/gi,""); s = s.replace(/<.*>/gi,""); s = s.replace(/<\/.*>/gi,""); while(s != s.replace(/\r[\s]*\r/gi,"\r")){ s = s.replace(/\r[\s]*\r/gi,"\r"); }

Here is my quick script to change html to bbcode. and here is the line in question s = s.replace(/(.+?)<\/a>/gi,"$2"); Can I have some assistance so that when a href="blah">words I get [url=blah +]+words etc. Thank - oyu for any help.

Share this post


Link to post
Share on other sites
Advertisement
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!