i want to match all the text in both "" and ''. My text may contain any of these so i used or operator My regular expression is as follows
(\"(.*?)\"|'(.*?)')
to retrieve the text between quotes i have used groups like RegExp.$2 for "" and RegExp.$3 for '' Now using only one group can i retrieve either of these. For example i might not be knowing when "" is given and '' is used so can any one suggest a regular expression which satisfies the above mentioned property.