[Cialug] Regex Question

Will staticphantom at gmail.com
Mon Jul 25 15:17:59 UTC 2022


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
>


More information about the Cialug mailing list