Thought I would post this in the event someone might find it useful.
It is an XSL template that will accept two parameters, content and regex. The template returns "true" if the regex matches the string contained in content, otherwise it will return "false".
One caveat is the string must match completely. Therefore the string "hello world" does NOT match "llo" but does match ".*llo.*".
You can swap out the line that created variable "p" with
<xsl:variable name="p" select="pattern:compile(string(concat('.*',$regex,'.*')))"/>
to allow for partial string matches.
[PHP]
xmlns:xsl="
http://www.w3.org/1999/XSL/Transform" xmlns:xalan="
http://xml.apache.org/xalan" xmlns:string="xalan://java.lang.String"
xmlns

attern="xalan://java.util.regex.Pattern"
exclude-result-prefixes="xalan pattern string"
>
[/PHP]