i have text : -->>text1"in quote1" text2"in quote2" text3<<---
i use string.remove(QRegExp("\".*\""))
and get ->>text1 text3<<--
but i want get -->>text1 text2 text3<<--
whats wrong?
i have text : -->>text1"in quote1" text2"in quote2" text3<<---
i use string.remove(QRegExp("\".*\""))
and get ->>text1 text3<<--
but i want get -->>text1 text2 text3<<--
whats wrong?
By default regular expressions try to match as much data as they can -- in your case this causes .* to match as many characters as it can, so it swallows everything up to the last quotation mark. You have to ask the expression to match as less data as it can. To do this, call setMinimal(true) on the regexp object.
evgenM (24th March 2006)
hmm thanx i will try
Bookmarks