http://www.perlmonks.org?node_id=969216


in reply to Re: why is regex not matching final character?
in thread why is regex not matching final character?

That must be correct. I thought \w would gobble up the whole table name first and [^\s] would stop the gobbling at the first space. But it is matching as much as possible and excluding the last non-space character because it is not in the brackets as you said.