I have a program that require all keywords to be in a single paragraph, most of the time, separated by commas

For example:

I have those terms

1-Term
1.1-Term
2-Term
3-Term
4-Term

That i collected and organized into groups and subgroups with Titles and subtitles

Title

  • 1-Term

  • 1.1-Term

  • 2-Term

    • Sub-Title
      • 3-Term
      • 4-Term

But then i want to turn them into:

1-Term, 1.1-Term, 2-Term, 3-Term, 4-Term 
 

Removing certain marked words(Titles and sub-Titles), any Empty/Blank space, and Line breaks, while adding the commas between The Terms. I want to keep certain dashes “-”(like in words )

1-Term,1.1 -Term,2-Term,3-Term,4-Term

  • Cactus_Head@programming.devOP
    link
    fedilink
    English
    arrow-up
    1
    ·
    5 hours ago

    second part you’re not matching at all.

    That because the program/ add-on i am using, only requires certain keywords to blacklist videos

    so if it find What "X" Says About in a Video Title , it doesn’t need the rest of the sentence to blacklist the video.

    The other problem with regex is that every implementation does things differently

    Th developer links to Firefox’s developers Regex Documentation.

    Regex
    
    You can use Regex to match very specific patterns of text.
    
    /aaa+/i: will block content that include aaaAAAAAaaaaAAAaaa or aaaaaaaa
    /top \d+/: will block content that include top 10 movies, top 5 upcoming movies
    
    Supports negative too, by adding ! (exclamation mark) before the regex.
    Example: !/^a/i will block content that does not start with a 
    
    

    This is a snip-it of the the add-on Guide. I cant like to it cuz for some reason its only inside the extension but here is the add-on’s page