View Single Post
Old 05-23-2009, 08:19 AM   #6
kacir
Wizard
kacir ought to be getting tired of karma fortunes by now.kacir ought to be getting tired of karma fortunes by now.kacir ought to be getting tired of karma fortunes by now.kacir ought to be getting tired of karma fortunes by now.kacir ought to be getting tired of karma fortunes by now.kacir ought to be getting tired of karma fortunes by now.kacir ought to be getting tired of karma fortunes by now.kacir ought to be getting tired of karma fortunes by now.kacir ought to be getting tired of karma fortunes by now.kacir ought to be getting tired of karma fortunes by now.kacir ought to be getting tired of karma fortunes by now.
 
kacir's Avatar
 
Posts: 3,463
Karma: 10684861
Join Date: May 2006
Device: PocketBook 360, before it was Sony Reader, cassiopeia A-20
Quote:
Originally Posted by rogue_ronin View Post
If you want (pcre) regex in HTML:
Code:
Find: \_(.*?)\_
Replace: <i>$1</i>
m a r
.* would eat up also all underscores, because the star quantifier is "greedy"
so:
abc abc _def def_ abc abc _def_ abc
will become
abc abc <i>def def_ abc abc _def</i> abc

I would suggest something like
Code:
[^_]*
instead of
Code:
.*
kacir is offline   Reply With Quote