-2

I have this:

<li><a href="/page.asp?dac=all&amp;num=266">Company Name</a></li>

Using the following RegEx I could grab the url part:

(?<=<li><a href=").*num=.*(?=">)

I want to get the url without "amp;" section. So the result would be like:

/page.asp?dac=all&num=266

How should I do that?

Mehdi
  • 13
  • 1
  • 11
  • I might have misunderstood - do you want the `num` part? – SamWhan May 12 '16 at 13:42
  • The whole link WITHOUT & – Mehdi May 12 '16 at 14:08
  • 1
    Then you need som kind of code. What environment are we talking about? Language, Editor... (You'll have to use capture groups) – SamWhan May 12 '16 at 14:15
  • I using a Bot maker software. ZennoPoster, if it's not against rules here. – Mehdi May 12 '16 at 14:20
  • I guess what you really want to do is decode the string. I.e. Convert the `&` entity to `&`. – SamWhan May 12 '16 at 14:20
  • Can ZennoPoster use capture groups in the regex? If so, you could use that and output \1 and \2. For example :
  • – LukStorms May 12 '16 at 14:47