Skip to main content

Timeline for Removing ASCII "frame" around text

Current License: CC BY-SA 3.0

10 events
when toggle format what by license comment
Jul 27, 2015 at 10:56 comment added xyz Thanks. I generally use Regex in Java or online, and I never thought sed wouldn't support non-greedy. Accepting this answer.
Jul 27, 2015 at 10:55 vote accept xyz
Jul 27, 2015 at 10:35 history edited Arkadiusz Drabczyk CC BY-SA 3.0
added 99 characters in body
Jul 27, 2015 at 10:34 comment added Arkadiusz Drabczyk @prakharsingh95: in the old days, there used be something called useless use of cat on Usenet. To answer your question - I wouldn't go with sed if I wanted to avoid chaining because sed does not support non-greedy matches: stackoverflow.com/questions/1103149/…. I would use Perl. I will update my answer in a second.
Jul 27, 2015 at 9:50 history edited Quill CC BY-SA 3.0
improved grammar
Jul 27, 2015 at 9:48 comment added xyz Thanks! I incorporated your suggestion and indeed using two sed is much simpler. However, I am wondering if it's possible to do it with just one? And sure sed -r <file> is better, but I find cat <file> | sed easier to read.
Jul 27, 2015 at 9:39 comment added Arkadiusz Drabczyk No, I use | to chain two sed commands. The first one removes redundant characters at the beginning: s,^(/|\||\\) ,,g. What version of sed do you use? I use fortune as the file name.
Jul 27, 2015 at 9:37 comment added xyz I will agree it's complicated, but it definately works. I edited the question. And yours only removes the ending tag. That is trivial. I need a better way to capture the middle string.
Jul 27, 2015 at 9:37 review First posts
Jul 27, 2015 at 9:50
Jul 27, 2015 at 9:34 history answered Arkadiusz Drabczyk CC BY-SA 3.0