PDA

View Full Version : RegExp



pucara_faa
15th November 2009, 11:47
Hi,

I'm new to QRegExp, and I've been reading the QRegExp documentation, but I can't get to this:
I want a regular expression to match a string preceded by a word. For example, I have font-family="Tahoma";. I want to match JUST the font name ("Tahoma"), like it is in red.
I don't want to match the font-family, but it has to be before the font name.
Does somebody understand me?

P.D: I'm sorry about my poor English, I'm Argentinian.
Thanks in advanced.

Lykurg
15th November 2009, 13:25
You have to enclose the string you want with brackets "(" and ")".

EDIT: it is in the docs under "Capturing Text".

pucara_faa
15th November 2009, 13:41
Hi,
I've solved it by a simple way, althought it wasn't what I was looking for.
In Perl, it's called "lookbehind", and it's applied like this "(?<=)".
Qt doesn't support them, it just support lookahed.

Thanks.