in reply to string selection from a character class

karden,
I believe you misunderstand how character classes work. A character class represents a single character and to capture, you put the parens around the class:
/foo="([^"]+)"/
That will capture all the non-quote characters in between two quote characters.

I think what you are looking for is assertions. See perlre and the tutorial Using Look-ahead and Look-behind.

Cheers - L~R