Re: sed/regex question.. missing something simple...

2017-05-27 Thread Garry T. Williams
On Saturday, May 27, 2017 5:27:46 PM EDT bruce wrote: > Hi. > > I've got a file.. with a bunch of lines looking like: > > $bookVariable['asu']['Fall-2016']='link'; > $bookVariable['lehmancuny']['Fall-2016']='1'; > $bookVariable['uvu']['Fall-2016']='1'; > $bookVariable['wmich']['Summer II

Re: sed/regex question.. missing something simple...

2017-05-27 Thread Clifford Snow
Not the most elegant: sed -e 's/^.*bookVariable\[.\([a-z][a-z]*\).*$/\1/' On Sat, May 27, 2017 at 3:27 PM, bruce wrote: > Hi. > > I've got a file.. with a bunch of lines looking like: > > $bookVariable['asu']['Fall-2016']='link'; > $bookVariable['lehmancuny']['Fall-2016']='1'; > $book

Re: sed/regex question.. missing something simple...

2017-05-27 Thread Andy Blanchard
On 27 May 2017 at 22:27, bruce wrote: > Hi. > > I've got a file.. with a bunch of lines looking like: > > $bookVariable['asu']['Fall-2016']='link'; > $bookVariable['lehmancuny']['Fall-2016']='1'; > $bookVariable['uvu']['Fall-2016']='1'; > $bookVariable['wmich']['Summer II 2017']='1'; > $

sed/regex question.. missing something simple...

2017-05-27 Thread bruce
Hi. I've got a file.. with a bunch of lines looking like: $bookVariable['asu']['Fall-2016']='link'; $bookVariable['lehmancuny']['Fall-2016']='1'; $bookVariable['uvu']['Fall-2016']='1'; $bookVariable['wmich']['Summer II 2017']='1'; $bookVariable['wmich']['Summer I 2017']='1'; $bookVari