["Followup-To:" header set to comp.lang.perl.misc.]
On 2012-03-27 00:02, [email protected] <[email protected]> wrote:
> This is more like a regex brain.
>
> '
><img
> (?=\s)
> (?= (?:[^>"\']|"[^"]*"|\'[^\']*\')*? (?<=\s) width \s*=
> (?: (?> \s* ([\'"]) \s* (?<WIDTH>.*?) \s* \g{-2} )
> | (?> (?!\s*[\'"]) \s* (?<WIDTH>[^\s>]*) (?=\s|>) )
> )
> )
> (?= (?:[^>"\']|"[^"]*"|\'[^\']*\')*? (?<=\s) src \s*=
> (?: (?> \s* ([\'"]) \s* (?<SRC>.*?) \s* \g{-2} )
> | (?> (?!\s*[\'"]) \s* (?<SRC>[^\s>]*) (?=\s|>) )
> )
> )
> (?= (?:[^>"\']|"[^"]*"|\'[^\']*\')*? (?<=\s) height \s*=
> (?: (?> \s* ([\'"]) \s* (?<HEIGHT>.*?) \s* \g{-2} )
> | (?> (?!\s*[\'"]) \s* (?<HEIGHT>[^\s>]*) (?=\s|>) )
> )
> )
> (?= (?:[^>"\']|"[^"]*"|\'[^\']*\')*? (?<=\s) alt \s*=
> (?: (?> \s* ([\'"]) \s* (?<ALT>.*?) \s* \g{-2} )
> | (?> (?!\s*[\'"]) \s* (?<ALT>[^\s>]*) (?=\s|>) )
> )
> )
> (?> \s+ (?:".*?"|\'.*?\'|[^>]*?)+ > ) (?<!/>)
> '
"This is your brain on drugs."
SCNR,
hp
--
_ | Peter J. Holzer | Deprecating human carelessness and
|_|_) | Sysadmin WSR | ignorance has no successful track record.
| | | [email protected] |
__/ | http://www.hjp.at/ | -- Bill Code on [email protected]
--
http://mail.python.org/mailman/listinfo/python-list