trying to print a group from a regex match in python
Question: am trying to print the group info from my regex match match. My script matches
my regex versus line in my file, so that's working.

I have based this on the python regex tutorial btw ... I'm a python newbie
(with some perl experience) :)

    
    
    import re
    
    file = open('read.txt', 'r')
    
    p = re.compile("""
    .*,\\\" 
    (.*)            # use grouping here with brackets so we can fetch value with group later on
    \\\"
    """, re.VERBOSE)
    
    i = 0
    
    
    for line in file:
        if p.match(line):
            print p.group()   #this is the problematic group line
            i += 1
    


Answer: `re.match()` returns a match object - you need to assign it to something. Try

    
    
    for line in file:
        m = p.match(line)
        if m:
            print m.group()
            i += 1
    

