|
Posted by Toby A Inkster on 08/24/07 08:15
windandwaves wrote:
> Just out of curiosity. Do you know what the regular expression would
> be?
It's not a task I'd even *attempt* using regular expressions. If I really
needed to programatically modify some CSS, I'd parse the stylesheet into
some sort of object structure, tweak the objects and then re-serialise
back to CSS. Complex work, but the only way that's going to cover all the
edge cases.
--
Toby A Inkster BSc (Hons) ARCS
[Geek of HTML/SQL/Perl/PHP/Python/Apache/Linux]
[OS: Linux 2.6.12-12mdksmp, up 64 days, 11:52.]
TrivialEncoder/0.2
http://tobyinkster.co.uk/blog/2007/08/19/trivial-encoder/
Navigation:
[Reply to this message]
|