Question:

Regex question. Fast answer would be appreciated.?

by  |  earlier

0 LIKES UnLike

Using the PHP preg_replace function so find a specific encoded url and replace it with another, I would like to know a regex that can to the below thing:

Find:

website.stuff?q=http%3A%2F%2Fqqq.proxi /<FIND ANY RANDOM AMOUNT OF LETTERS, NUMBERS AND SYMBOLS OF VARYING LENGTHS>folder%2Ffile.html%3Fparam1%3Dst...

I know how to do the PHP stuff, its the regex used that's bending my mind.

NOTE: Don't include the < > in the actual regex, they are there just to aid readability, add a http://www. in front of the website.stuff and there is no space between proxi and the /.

P.S. The yahoo spam filter really annoys me.

 Tags:

   Report

1 ANSWERS


  1. I use http://www.weitz.de/regex-coach/

    &lt;*(.*?)&gt; will match on the stuff between &lt;&gt;

Question Stats

Latest activity: earlier.
This question has 1 answers.

BECOME A GUIDE

Share your knowledge and help people by answering questions.