Stick to one language in anvil

Instead of having a mix of sed inline with python just use
one language and stick to its regex processing routines instead
so that anvil doesn't require to much of a learning curve (more
than it already has).

Change-Id: Idd4cf883477b44ad536e45d9f645b5929c1fbcc7
Merge "Stick to one language in anvil"