Probably not what you want it to. The variable probably doesn't have metacharacters quoted, the end tag you'll find probably won't be the right one, and you should probably be using an XML parser to parse XML.
But if you're asking what regular expressions do, perhaps you should look at the documentation.