http://qs1969.pair.com?node_id=75510

darobin has asked for the wisdom of the Perl Monks concerning the following question:

I'm having trouble with Text::Balanced::extract_bracketed and I'm hoping someone here could tell me whether it's a bug in the way I use it, in the fact that I use (it can't be done with it), or in the module itself.

I have the following sample data:

{ prop: "\ value"; }

As you probably know, that's valid CSS syntax. I'm trying to extract that block from the CSS (It's at the beginning of the string at the moment when I'm calling what follows) with:

($foo,$bar,undef) = Text::Balanced::extract_bracketed($css,q/{}'"/,qr/ +\s*/);

I tried variations on the above, but it never seemed to work: the text doesn't get extracted. TIA for any help.

-- darobin -- knowscape 2 coming soon --