soft4pedia Posted March 11, 2016 Share Posted March 11, 2016 Hello, I'm having several type of text files but my text files are having unnecessary space because of enters (end of line or line breaks) but I want my text in continuous stream. There is no basically proper order of enter-spaces (end of line breaks) sometime there are two line breaks, sometime 3 to 8 lines breaks but I only want 1 line break at the end of end...Please help me which pattern will be suitable for me to use "StringRegExReplace" command to remove unnecessary breaks in my text files.. $File1 = @ScriptDir & "\text01.txt" $txt = FileRead($File1) ; Please recommend me which pattern will be fine to remove unnecesary end of line Enter-spaces $txt = StringRegExpReplace($txt, 'Not sure about pattern', "") FileWrite (@scriptdir & "\text02", $txt) Link to comment Share on other sites More sharing options...
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 account
Already have an account? Sign in here.Sign In Now