I have a text file with some data:
...
DATA_ARRAY Some[] =
{
...
};
and I have a python 2.7 regex like this:
regx = re.compile("^DATA_ARRAY Some\[\].*?};", re.DOTALL)
regmatch = re.search(regx, data)
print regmatch.group(0)
The problem is that the regex does not match anything (regmatch is None). If I remove the ^ then it matches just fine.
What am I doing incorrectly here? I would like to add the line beginning search symbol.