Re: Picking apart strings

2008-06-03 Thread Russ P.
On Jun 3, 11:44 am, tmallen <[EMAIL PROTECTED]> wrote: > Is there a way to pick apart this text without resorting to regular > expressions? > > p { > color: black; > > } > > p -> element > color -> property > black -> value Sure. data = txt.strip("}").split("{") element = data[0].strip() it

Re: Picking apart strings

2008-06-03 Thread jay graves
On Jun 3, 1:44 pm, tmallen <[EMAIL PROTECTED]> wrote: > Is there a way to pick apart this text without resorting to regular > expressions? > > p { > color: black; > > } > > p -> element > color -> property > black -> value http://code.google.com/p/cssutils/ -- http://mail.python.org/mailman/l