[GTALUG] Hardcore sed foo

Lennart Sorensen lsorense at csclub.uwaterloo.ca
Thu Nov 7 13:26:04 EST 2019


On Tue, Nov 05, 2019 at 06:42:44AM -0500, Giles Orr via talk wrote:
> On Tue, 5 Nov 2019 at 01:47, William Park via talk <talk at gtalug.org> wrote:
> 
> > 0 or 1 match is ?
> > Eg.  echo /aaa/.bbb//ccc/123 | sed 's,\(/\.\?[^/]\)[^/]*,\1,g'
> > --William
> >
> 
> Nice - that works too.
> 
> Jeez regex is a pain - it took three minutes of staring at that just to
> figure it out, even though I knew what we were both trying to achieve.

Practice time!

https://regexcrossword.com

-- 
Len Sorensen


More information about the talk mailing list