How do I validate text length subtracting HTML markup from a field

I have looked around for a solution to this and have not been able to find one. The String Length validation includes HTML characters from what I can tell. I tried using a JEXL expression

 $value.replaceAll('<(.|
)*?>','').length > 128 

but this raises an error.

Just to clarify so I understand your problem, you have a text field in one your content types that contains HTML. e.g.

<strong>Some text</strong>
and you want to validate only the text within the tags?

There is a JEXL method in the PSO Toolkit called $user.PSOStringTools.removeXml(). It looks like this will strip the markup like you are looking to do.

-nate