javascript regular expression help required

6pack

ex-Mod
i want to replace all the (text here wont be replaced) and all the


whats the reg expression to do this?
i tried using Regex Tester – RegexPal
but it seems the expression i wrote does not work

/<a (href|name)=\u0022(http|https|ftp)\://[a-zA-Z0-9\-\.]+\.[a-zA-Z]{2,3}:)[a-zA-Z0-9]*)?/?([a-zA-Z0-9\-\._\?\,\'/\\\+&%\$#\=~])*$\" >(.)<\/a>/gi;
/<img src=\u0022(http|https)(.*)\u0022 >/gi

wots wrong in my code? :ashamed:
 
lol. ok i want to replace the html links in a rss feed with space. i want to show a summary of post title with a few words in another text box. if too many images are posted in the beginning then i can see only the images and its hard to get the post content.

so i am trying to remove the images and links from starting first 300 to 1000 characters and then after that i will split the content to get a smaller content for the title.

regex tester is online tester to test regular expressions. you type the regular expression in the top box and sample data in bottom box. the words or characters effected by the regex will be highlighted in yellow so you know your regex works. so you get opportunity to change the syntax while testing simultaneously.
 
Back
Top