Looking for a plugin that is able to search for exceptions



  • Hi, I’m managing an OBS scene Json, there are hundreds of cameras configured with few missing parameters, I need to search for them.
    For example I’ve a string:

    "settings":{"buffering_mb":1,"clear_on_media_end":true,"close_when_inactive":true
    

    which is what I want, but there is a hidden:

    settings":{"clear_on_media_end":true,"close_when_inactive":true
    

    I’m just counting occurences of “buffering” and discovere there is one less than “clear_on_media_end”, I have no idea where it is. I need to search for “clear_on_media_end” and chars before it that are different than “1,” " for example, that I know are right and I expect to find. Shortly I’ve to make a combination search for what exist and what should not be, and see occurences, then where are located.
    There is any pluging which makes this combination search? Thank you



  • @Giovanni-Gozzi said in Looking for a plugin that is able to search for exceptions:

    “clear_on_media_end” and chars before it that are different than “1,”

    As it seems that you are looking for static text I would suggest using the bookmark function to mark lines which do have this text, then invert the bookmarks which then highlight the lines without that text.
    To do this select that text from 1 line which is correct, then select the Mark function. Once on that tab also tick bookmark and than mark all. Then go to bookmark in the menus and select option to invert those bookmarks, which are blue circles at start of selected lines.

    There is one issue though, if there are other types of lines they will also be selected, but you have only shown one line as an example. If this is the case it can be done with a regular expression, so come back with more details.

    Terry



  • @Terry-R said in Looking for a plugin that is able to search for exceptions:

    There is one issue though, if there are other types of lines they will also be selected, but you have only shown one line as an example.

    As I’m now on a PC I thought I would provide the alternative I mentioned in the previous post.
    Again, use the Mark function with the “bookmark lines” ticked, make sure the search mode is “regular expression” and insert the following into the Find What field
    [023456789](?=,"clear_on_media_end")
    As you can see it’s looking for a single number, anything but a 1 followed by the text you are keying on. This WILL mark the line(s) you are looking for, so no need to inverse the marks as the previous solution stated. F2 and Shift-F2 will move the cursor to next/previous bookmarked lines so easy to find once the mark function has completed.

    Terry


Log in to reply