Use regexp instead of parsing XML.

Fix unittest of the ubuntu check