![]() Topic awaiting preservation: Regexp reverse-templating (Page 1 of 1) |
|
---|---|
Bipolar (III) Inmate From: The little green dot at the center of your monitor |
![]() Hello, |
Maniac (V) Mad Scientist From: 100101010011 <-- right about here |
![]() Well here's a quickie |
Maniac (V) Mad Scientist From: :morF |
![]() For this you could do a preg_replace_callback, which allows you to use one regex function to match the whole string, then pass it to a function wherein you can use more regex to match what's inside the string. code: $input = '<title>Welcome to my site</title>';
code: function my_callback_function($matches) //feel free to name this anything you want, but don't forget to change the name in the regex function too
|
Paranoid (IV) Inmate From: Milwaukee |
![]() Good info Skaarjj -- what with your work on the Grail, you're quickly becoming a regex go-to man! |
Maniac (V) Mad Scientist From: :morF |
![]() Oooh...I've always wanted to be a 'man' with some worked tacked onto the start |
Bipolar (III) Inmate From: The little green dot at the center of your monitor |
![]() Thanks, Skaarjj! |
Bipolar (III) Inmate From: The little green dot at the center of your monitor |
![]() Unfortunately, I don't know much about regular expressions, so I can't debug this one, but here's your code: http://students.washington.edu/jbarbero/public/concept/scraper/testsrc.php |
Bipolar (III) Inmate From: The little green dot at the center of your monitor |
![]() Generic PHP scraper class, pretty darn good now, HTTP extension kinda slow for now. http://students.washington.edu/jbarbero/public/scraper/scraper_src.php |