CSS to define different formats for digits/non-digits
How do I use CSS to define a text input area where digits and 开发者_开发百科non-digits are rendered with different formats (bold/italic/color)?
i.e. 345 dollar -> 345 dollar
Are there anything equivalent to Regular Expression Library fo regex for CSS?
Below are editedI'm using the Seam framework, any alternatives to achieve this is also welcomed.
As svinto already says, this is definitely not possible. Not even, as far as I can see, using an advanced CSS tool like LESS.
You will have to work around by putting the digit into a tag:
<span>345</span> dollar
you could of course automate that in a scripting language using Regexes, but I would recommend formatting the output properly instead of relying on such "post-processing", which can break any time when the formatting changes, for example in a different language / locale.
What you want isn't possible.
You can't accomplish this in CSS exclusively. You could use PHP or Javascript to tag content that matches your criteria and style those tags with CSS, however.
精彩评论