On Fri, Mar 30, 2018 at 3:12 PM, d.s. <
cho...@gmail.com> wrote:
> also this
>
> #!/usr/bin/python3
> import re
>
> x='MATH 59900/40 [47490] - THE'
> a=re.match(r'(\D+) (\d+)/(\d+) (\[\d+\]) - (\D+)', x)
>
> print a.group(1)
> print a.group(2)
> print a.group(3)
> print a.group(4)
> print a.group(5)
>
Thanks... it was the last piece with the brackets...
>
> On Fri, Mar 30, 2018 at 11:56 AM, <
cho...@gmail.com> wrote:
>>
>> Check put
regexr.com, it’ll help with figuring out your regex.
>>
>> —
>> chorgy
>>
>> > On Mar 30, 2018, at 10:55 AM, bruce <
bado...@gmail.com> wrote:
>> >
>> > hey...
>> >
>> > anyone here with regex chops..
>> >
>> > really basic regex question... i'm missing something..
>> >
>> > x="MATH 59900/40 [47490] - THE "
>> >
>> > need to extract MATH, 59900, and 40
>> >
>> > a=re.match(r'(\D+).. gets the "MATH"...
>> >
>> > but can't see how to get the rest of the string/groups..
>> >
>> > --
>> > You received this message because you are subscribed to the Google
>> > Groups "LVL1 - Louisville's Hackerspace" group.
>> > To unsubscribe from this group and stop receiving emails from it, send