Is it possible to determine if a template variable in a Django template satisfies a regular expression? In the following template, I want to set the CSS class for the parag