View Single Post
Old 08-04-2019, 08:02 PM   #2
davidfor
Grand Sorcerer
davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.
 
Posts: 24,905
Karma: 47303824
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
Try:

Code:
\/\/\s(.*?)\s\/\/
The slashes need to be escaped, hence "\/". Then a space, "\s" and "(.*?)" is capture any text but not the space before the closing doubleslashes.

With the replacement:

Code:
<i>\1</i>
Note, for the search, I would probably use:

Code:
\/\/\s*(.*?)\s*\/\/
That covers any amount of whitespace around the text. With either, you need to be careful in case there missing doubleslashes.

Last edited by davidfor; 08-04-2019 at 10:04 PM. Reason: Fixing second example.
davidfor is offline   Reply With Quote