Why does my RegExp match in RegExr, but not in Python?
Because you should replace
match tries to match the string from the beginning, and
\"O1533_FOO\" INTEGER NOT NULL , doesn’t begin with something that matches
[A-Z], hence it fails.
Python offers two different primitive operations based on regular expressions:
re.match()checks for a match only at the beginning of the string, while
re.search()checks for a match anywhere in the string (this is what Perl does by default).
Read more here: Source link