I've seen very similar posts on here but I can't seem to get any of them to work. 

Here is my code

```
import re

regex='<item>
<obj1>grab1</obj1>
<obj2>text<obj2>
...
</item>'
pattern=re.compile(regex)
searchfile=open('data.dat')
filetext=searchfile.read()
text=re.findall(pattern,filetext)
print text

```

I've tried putting \n in so the string looks like 

```
regex='<item>\n
<obj1>grab1</obj1>\n
<obj2>grab2<obj2>\n
...
</item>'

```

but it doesn't work. Any help would be appreciated.