[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Group at several places in string

From: Johan Andersson
Subject: Group at several places in string
Date: Tue, 12 Jan 2010 23:23:55 +0000


I have string that contains smaller chunks of text, which  are wrapped within double quotes. Example:
Lorem ipsum dolor sit amet, "consectetur" adipiscing elit. Donec "suscipit justo" sit amet sem bibendum "sit amet" porttitor mi pretium.

I'm looking for a way to add all the chunks in double quotes in a list. So in this case:
'("consectetur" "suscipit justo" "sit amet")

I have created such a function with help of some while loops and whatever else. But I thought that it could be done with some regex like this "\"\\([^\"]+\\)\"" and then fetch the groupings. But it does not work.

How would you solve this?


reply via email to

[Prev in Thread] Current Thread [Next in Thread]