coffeeturtle Posted September 27, 2018 Posted September 27, 2018 Need to perform a StringReplace of the em dash and en dash to strip them from web content pages. Em dash character is not a part of the ASCII character set. So if I copy and paste an em dash into SciTE it merely appears as a hyphen and therefore no search results. So instead of seeing: StringReplace($TtextClean, "—", " ") it looks like this: For example: StringReplace($TtextClean, "-", " ") appears correctly on the webpage. Any suggestions, please? Thank you.
mikell Posted September 27, 2018 Posted September 27, 2018 (edited) StringReplace($TtextClean, ChrW(0x2014), " ") ;em dash Edit : en dash = 2013 BTW you can replace the 3 dashes in one shot using StringRegExpReplace $TtextClean = StringRegExpReplace($TtextClean, "\x{2013}|-|\x{2014}" , " ") Edited September 27, 2018 by mikell Desnar, coffeeturtle, AlienStar and 1 other 1 3
coffeeturtle Posted September 27, 2018 Author Posted September 27, 2018 5 hours ago, mikell said: StringReplace($TtextClean, ChrW(0x2014), " ") ;em dash Edit : en dash = 2013 BTW you can replace the 3 dashes in one shot using StringRegExpReplace $TtextClean = StringRegExpReplace($TtextClean, "\x{2013}|-|\x{2014}" , " ") Much appreciated. They all worked!
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now