Jump to content

Regular Expressions


peasepud
 Share

Recommended Posts

Seeing as our own resident Northern Ireland residing expert cant be arsed to help me because of some self centred need to gain promotion I need help from anyone that understands these. Ive tried many a time and frankly havent got a bastard clue!

 

I know it can be done and is fairly straight forward.

 

I want a regex that will add a bit to the start of any link in the document

 

ie <a href="http://www.bbc.co.uk">'>http://www.bbc.co.uk">

 

I want to change to

 

<a href="http://www.toontastic.net/result.php?theurl=http://wwww.bbc.co.uk">

 

at the same time there could be other bits in the link

 

eg

 

<a href="http://www.bbc.co.uk" title="BBC" />

 

or the http may be missing

 

<a href="www.bbc.co.uk"/>

 

or any one of a dozen other valid link setups.

 

therefore I need to find any <a tags and add in a bit between the speech mark and the next char regardless of whats shown etc

 

Anyone?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.