Jump to content

User:Chris the speller/HyphenRegEx

From Wikipedia, the free encyclopedia

Suggested "Find and replace settings" for AWB to remove unnecessary hyphens. Simply splice into your .xml settings file (make a backup of your settings file first). See the section How to splice. Then use "File/Open settings..." within AWB.


The code

[edit]
     <Replacement>
       <Find>\b(careful|environmental|Environmental|frequent|ful|high|new|part|poor|public|sexual|slight|usual|wide)ly-</Find>
       <Replace>$1ly </Replace>
       <Comment>newly-</Comment>
       <IsRegex>true</IsRegex>
       <Enabled>true</Enabled>
       <Minor>true</Minor>
       <RegularExpressionOptions>None</RegularExpressionOptions>
     </Replacement>
     <Replacement>
       <Find>\b(whol|commercial|critical|Critical|financial|fine|former|loose|private|rapid|rare|separate)ly-</Find>
       <Replace>$1ly </Replace>
       <Comment>wholly-</Comment>
       <IsRegex>true</IsRegex>
       <Enabled>true</Enabled>
       <Minor>true</Minor>
       <RegularExpressionOptions>None</RegularExpressionOptions>
     </Replacement>