On Fri, 30 Mar 2018 at 12:03 bruce <badoug...@gmail.com> wrote: > Hi. > > Trying to quickly get the re.match(....) to extract the groups from the > string. > > x="MATH 59900/40 [47490] - THE " > > The regex has to return MATH, 59900, 40,, and 47490 > > d=re.match(r'(\D+)...) gets the MATH...
did you look into d.group(0) if d existed? > > > But I can't see (yet) how to get the rest of what I need... > > Pointers would be useful. > > Thanks > _______________________________________________ > Tutor maillist - Tutor@python.org > To unsubscribe or change subscription options: > https://mail.python.org/mailman/listinfo/tutor > -- Liu An Institution of modern physics, Shanghai, China _______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor