Prevent regex from matching partial symbol.
commit57da6a51826a671ac6d2c4da48fc7a75b6233959
authormhagger <mhagger@be7e6eca-30d4-0310-a8e5-ac0d63af7087>
Tue, 18 Dec 2012 07:54:14 +0000 (18 07:54 +0000)
committermhagger <mhagger@be7e6eca-30d4-0310-a8e5-ac0d63af7087>
Tue, 18 Dec 2012 07:54:14 +0000 (18 07:54 +0000)
treee13a3f3a01aec6712f0bfc4845767a5f59b4775a
parentc8995e48d6d61e3286db579d594b9b9df33619ce
Prevent regex from matching partial symbol.

The _RegexpStrategyRule class tacks '^' and '$' around a regex to
match full lines only, which doesn't work when the regex contains a
top level OR ("|") due to order of operations.  For example, "foo|bar"
becomes "^foo|bar$", which matches "foobaz" and "bazbar".

Putting a non-capturing group around it fixes the problem.

Patch by: Jason K O'Brien <jason.obrien@constellation.com>

git-svn-id: http://cvs2svn.tigris.org/svn/cvs2svn/trunk@5409 be7e6eca-30d4-0310-a8e5-ac0d63af7087
cvs2svn_lib/symbol_strategy.py