Skip to content

Instantly share code, notes, and snippets.

@JoeGlines
Created July 13, 2020 12:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save JoeGlines/2dff8fb34540f99acae7c3fd671b03da to your computer and use it in GitHub Desktop.
Save JoeGlines/2dff8fb34540f99acae7c3fd671b03da to your computer and use it in GitHub Desktop.
Auto Replace Illegal charachters
;~ #Include <default_Settings>
;**************************************
;http://ahkscript.org/docs/commands/Transform.htm http://www.w3schools.com/charsets/ref_html_8859.asp
;~ http://www.w3schools.com/charsets/ref_html_entities_4.asp ;~ http://www.ascii.cl/htmlcodes.htm
Send ^c ;copy
Sleep, 100
Transform,Clipboard,html,%Clipboard%,3 ;3=numbered expressions used where named expression not available
;~ Clipboard:= RegExReplace(Clipboard, "mUs)&bull;\s(.*).<br>", " <ul><li>$1</li></ul>") ;convert bullet & br to ul
Clipboard:= RegExReplace(Clipboard, "mUs)&bull;\s(.*).<br>", " <li>$1</li>") ;convert bullet & br to ul
Clipboard:= RegExReplace(Clipboard, " <li>(.*)</li>", " <ul>`r`n <li>$1</li>`r`n </ul>") ;convert bullet & br to ul
Clipboard:= RegExReplace(Clipboard, "mUs).<br>", "<br>") ;convert bullet & br to ul
Send ^v
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment