[Cialug] Regex Question

Dave Hala dave at 58ghz.net
Mon Jul 25 15:43:25 UTC 2022


Wow!

I didn't know about jq... That looks like a *super* useful tool.

On Mon, Jul 25, 2022 at 10:40 AM Scott Yates <Scott at yatesframe.com> wrote:

> Yes, regex is probably not the right tool for that.  jq would be better, or
> even just a little script, but trying to parse json with regex is asking
> for serious headaches.
>
> On Mon, Jul 25, 2022 at 10:18 AM Will <staticphantom at gmail.com> wrote:
>
> > I wouldn't use regex for this but I would use jq and pluck the fields you
> > want. Alternatively use grep -v and omit the line command line.
> >
> > -Will C
> >
> > On Mon, Jul 25, 2022, 11:15 Todd Walton <tdwalton at gmail.com> wrote:
> >
> > > Let's say I have a block of text like this:
> > >
> > > ===================================
> > >             {
> > >                 "altGrAliasing": true,
> > >                 "antialiasingMode": "grayscale",
> > >                 "closeOnExit": "graceful",
> > >                 "colorScheme": "Campbell",
> > >                 "commandline":
> > >
> > >
> >
> "C:\\Users\\seven\\AppData\\Roaming\\Scoop\\apps\\msys2\\current\\msys2_shell.cmd
> > > -defterm -here -no-start -msys",
> > >                 "cursorShape": "bar",
> > >             },
> > > ===================================
> > >
> > > How do I write a regex to match all lines *except* the "commandline"
> > line?
> > >
> > > --
> > > Todd
> > > _______________________________________________
> > > Cialug mailing list
> > > Cialug at cialug.org
> > > https://www.cialug.org/cgi-bin/mailman/listinfo/cialug
> > >
> > _______________________________________________
> > Cialug mailing list
> > Cialug at cialug.org
> > https://www.cialug.org/cgi-bin/mailman/listinfo/cialug
> >
> _______________________________________________
> Cialug mailing list
> Cialug at cialug.org
> https://www.cialug.org/cgi-bin/mailman/listinfo/cialug
>


-- 
NIFCAP  -The Premier Client Intake System for Non-Profit Organizations.
https://www.osis.us


More information about the Cialug mailing list