I love BBEdit on my Mac, but I was left scratching my head again today when I was trying to remember how to make its regex engine match a pattern across multiple lines. My hope was to extract a list of initial articles from a page that had HTML like this:
[...]
Posted February 9, 2009 by Casey Bisson
Categories: Technology. Tags: bbedit, grep, regex, regular expressions. One Comment.
Regular expressions are a pain. Jan Goyvaerts’ RegEx Reference helps.
In a related tip, the following will eliminate any non-numeric components in a string: ereg_replace(“[^0-9]”, “”, $string) . I guess I’ll have to admit that I’d not used the exclusion operator before (the carrot immediately following a square bracket). Now I know.
tags: ereg_replace, exclusion operator, php, [...]
Posted June 28, 2005 by Casey Bisson
Categories: Technology. Tags: ereg_replace, exclusion operator, php, regex, regex reference, regular expressions. One Comment.