Convert Relative Paths to Absolute Using Regular Expressions (code.nontalk.com)
submitted by
rimsystems(6119) 4 years, 8 months ago
I ran into a situation where I needed to screen scrape some content from a site and display it on my own site. This works really well except for dependent files like javascripts, SWFs and images that had src attributes with relative paths. So I figured it wouldn't be that hard to create a helper method to find and replace them using Regular Expressions.
|category: Regular Expressions
|Views: 134
tags:
RegEx another
Everyones tags:
Your Tags: