1

I have a string, for example:

<script language="javascript" src="http://track.adform.net/adfscript/?bn=2827619"></script>
<noscript>
<a href="http://track.adform.net/C/?bn=2827619;C=0" target="_blank">
<img src="http://track.adform.net/adfserve/?bn=2827619;srctype=4;ord=[timestamp]" border="0" width="728" height="90" alt=""/>
</a>
</noscript>

<script language="javascript" src="http://track.adform.net/adfscript/?bn=2826814"></script>
<noscript>
<a href="http://track.adform.net/C/?bn=2827619;C=0" target="_blank">
<img src="http://track.adform.net/adfserve/?bn=2827619;srctype=4;ord=[timestamp]" border="0" width="728" height="90" alt=""/>
</a>
</noscript>

Now i want to get bn=numbers in an array. But only one from each script. Not duplicate. And i wait the size of each banner in same array. Anyone know how to do?

3
  • what is the workflow, and my apologies for SO contributors, but what have you tried?! Commented Nov 21, 2013 at 12:58
  • Which bn do you want to find? Because the ones in the <a> and <img> tags are all duplicates in this case, so you want to get them from the srcs of the script tags? Commented Nov 21, 2013 at 13:07
  • rolfv1: I want the bn from the src in javascript code. bn=2826814 and bn=2826819 Commented Nov 21, 2013 at 13:11

1 Answer 1

1

Here's one way to do it:

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.