![]() |
Regex and preg experts please
Guys I am trying to use preg to pull a string in.
The string starts with src=" and ends with image.jpg The middle is variable. I need to pull the entire string using the start and end of it from a page I am fopen-ing. This page is stored in a string. So I have the data here but it's a full html page. So I am going into $source, and I am trying to pull that specific string. Anyone have some suggestions? It would be a snap if I knew what the middle of the string was, but it's *. Thanks! |
This is probably too greedy of a regex, but you can try:
preg_match("/src=\".*image.jpg\"/",$source,$matched); |
/src\=\"(.*?)image\.jpg/isU
yes? no? maybe? I dunno I suck at that shit and I didn't try that expression but it should be somewhere in the neighbourhood of what you're looking for at least. |
Quote:
|
Man I am getting good, I was just missing a "."
Thanks for the help guys, I appreciate it. |
All times are GMT -7. The time now is 06:40 AM. |
Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123