Thread: Regex examples
View Single Post
Old 12-23-2012, 08:47 AM   #160
roger64
Wizard
roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.
 
Posts: 2,608
Karma: 3000161
Join Date: Jan 2009
Device: Kindle PW3 (wifi)
To replace hyphen with non-breaking hyphen

Hi

I try to set up a regex for French language.

We have some acronyms linked with hyphens 8208 like
J.-C, P.-D.G. (and the list can grow) They are always unhappily hyphenated and it would be much better if they were not. That's why I would like to replace their hyphens with non-breaking hyphens 8209
I do not know how to set up this regex. Ideally, I would like to be able to just add easily one new word.

I think there must be better than this.
I wrote only 8208 instead of the full &#...:

Search: (J.|P.)8208(C.|D.G)
Replace: \18209\2
roger64 is offline   Reply With Quote