Parsing API
This API exposes the following functions to all drupal modules.
before($this, $inthis)
after($this, $inthis)
between($this, $andthis, $inthis)
multi_between($this, $andthis, $inthis)
starts_with($this, $inthis)
ends_with($this, $inthis)
surround($this, $withthis, $andthis)
(there are more as well, read the docs for a full listing)
These are great for parsing websites and pulling in non-standard data. Also known as "scraping" a website. It can be used for ANY text, not just websites. The text can come from anywhere. Email, dynamic content, etc. The functions are by default run through check_plain(). It should be noted that this MAY cause un-desired results. If it does, simply disable the check_plain functionality by adding the extra FALSE argument to the function calls as seen in the examples. However, it's best to use check_plain() first if at all possible.
Releases
| Official releases | Date | Size | Links | Status | |
|---|---|---|---|---|---|
| 6.x-1.8 | 2008-Oct-28 | 7.26 KB | Download · Release notes | Recommended for 6.x | |
| 5.x-1.8 | 2008-Oct-28 | 7.27 KB | Download · Release notes | Recommended for 5.x | |
