Jim Michaels - 2012-12-17
s/"\([^"]*\)"\?\s*$/\1/mg

does not work. even without the m. this is for operating on web logs to extract the user agent.
I get the error message

sed: file extract-UA.sed line 2: invalid reference \1 on `s' command's RHS

the commandline argument is

sed  --regexp-extended --file=extract-UA.sed *-20*
 

Last edit: Jim Michaels 2012-12-17