Thread: Regex examples
View Single Post
Old 07-26-2025, 07:25 PM   #793
Doitsu
Grand Sorcerer
Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.
 
Doitsu's Avatar
 
Posts: 5,779
Karma: 24088595
Join Date: Dec 2010
Device: Kindle PW2
A quick and dirty solution would be:

Find:\b(I|[yY]ou|[hH]e|[sS]he|[iI]t|[wW]e|[tT]hey|[tT]hat|[tT]here|[hH]ere|[wW]hat|[wW]ho|[wW]here|[sS]hould|[cC]ould|[wW]ould|[mM]ust|[mM]ight|[cC]an|[dD]o|[dD]id|[dD]oes|[hH]ad|[hH]as|[hH]ave|[iI]s|[nN]eed|[oO]ught|[wW]as|[wW]ere)(ll|re|ve|nt|m|d|s)\b

Replace:\1'\2

It's not a perfect solution though, because it'll replace hell with he'll but also here with he're.

Last edited by Doitsu; 07-26-2025 at 07:32 PM.
Doitsu is offline   Reply With Quote