> -----Original Message----- > From: piclist-bounces@mit.edu [mailto:piclist-bounces@mit.edu] On Behalf > Of Isaac Marino Bavaresco > Sent: 24 January 2013 14:34 > To: Microcontroller discussion list - Public. > Subject: Re: [OT] Regex help >=20 > Em 24/01/2013 11:11, Isaac Marino Bavaresco escreveu: > > This should do: > > > > \+CMGL: (\d+),"(.+)","\d+","*(.*)"*,"(.+),(\d+),(\d+) > > > > > > Best regards, > > > > Isaac >=20 >=20 > Oops! The closing quote wasn't removed and I forgot the capture group for > the first numeric group >=20 > This works: >=20 > \+CMGL: (\d+),"(.+)","(\d+)",("(.*)")*,"(.+),(\d+),(\d+) >=20 >=20 > It creates an additional capture group that that you must ignore. > Your results are in \1, \2, \3, \5, \6, \7 \8 >=20 > \4 contains the name with quotes and \5 contains the name without quotes > or is empty. >=20 >=20 > Best regards, >=20 > Isaac Thanks Isaac, that for me exactly as you described. Cheers Mike =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D This e-mail is intended for the person it is addressed to only. The information contained in it may be confidential and/or protected by law. If you are not the intended recipient of this message, you must not make any use of this information, or copy or show it to any person. Please contact us immediately to tell us that you have received this e-mail, and return the original to us. Any use, forwarding, printing or copying of this message is strictly prohibited. No part of this message can be considered a request for goods or services. =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --=20 http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .