Jump to content

matching urls, and storing the actual url in a variable


PC Nerd

Recommended Posts

Hi,

 

Firstly - I know the most basic of regex, and thats it.  Im looking to match the pattern:    src="[A-Za-z0-9]"

* well at least, thats roughly it.

 

How can I store the patern matched by [A-Za-z0-9], but only in teh context of src="pattern" ? 

 

* Im attempting to parse urls on a page, and make them absolute, so i wil be adapting the same code to href etc.

 

Thanks!

Ok thanks,

 

So how do I then use that matched pattern?    I want to be able to parse only the url into a function, and then replace the function returned value, back into the original string that was matched.

 

Thanks

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.