Topic awaiting preservation: Regexp reverse-templating (Page 1 of 1) |
|
---|---|
Bipolar (III) Inmate From: The little green dot at the center of your monitor |
posted 12-02-2003 23:22
Hello, |
Maniac (V) Mad Scientist From: 100101010011 <-- right about here |
posted 12-03-2003 00:18
Well here's a quickie |
Maniac (V) Mad Scientist From: :morF |
posted 12-03-2003 00:41
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 |
posted 12-03-2003 12:15
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 |
posted 12-03-2003 17:05
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 |
posted 12-03-2003 18:40
Thanks, Skaarjj! |
Bipolar (III) Inmate From: The little green dot at the center of your monitor |
posted 12-03-2003 21:00
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 |
posted 12-16-2003 21:59
Generic PHP scraper class, pretty darn good now, HTTP extension kinda slow for now. http://students.washington.edu/jbarbero/public/scraper/scraper_src.php |