Building a class to match regexp in a read-in .txt file

I am quite new to python and have some troubles in understanding how to build up proper classes. I am currently looking for a way to let my class find words (or any other regexp) in a txt file and to print those words (in blue) and their lines. Right now, my class is doing not much and I can't figure out why.

Here's the code:

import re
class RegIter():
    def __init__(self, path, regexp):
        with open (path) as f:
            self.text=f.read()
        self.text=str(re.finditer("\w+|[^\w ]+",self.text))     

        self.wörter=list()                                  
        wörter=self.wörter                                 


        self.regexp=re.compile(self.text)


    def print(self):
        print(self.text)

    def makeBlue(text):
        return ("\033[34m"+str(text)+"\033[0m")



    def __str__(self):                          
        beginn=0
        for match in self.regexp.finditer(line):           
            start=match.start()
            end=match.end()
            print(line[beginn:start], end="")
            beginn=end
            return(line[start:end])                    
            print(self.makeBlue(line[start:end]), end="")


    def __iter__(self):
        self.c=0
        return self

    def __next__(self):
        if self.c<len(self.wörter):
            returner=self.wörter[self.c]
        else:
            raise StopIteration
            self.c+=1
        return returner

    def __len__(self):
        return len(self.wörter)

myobject=RegIter("Bsp1.txt", "\w+|[^\w ]+")
print(len(myobject))

for match in myobject:
    print(match)
    print(myobject)    

It is probably very easy to spot the mistakes, but I can't find why it doesn't work.