• BiscuityCat@lemmy.world
    link
    fedilink
    arrow-up
    7
    ·
    4 days ago

    I never understood why are people scared of regular expressions. I love them and they can be quite usefull.

    Here is an example of one regex I wrote recently - it is used in replace:

    (?:^-\[[^[]+\]$| ?\[.+?\] ?)
    
    • Funkt4st1c@lemmy.world
      link
      fedilink
      English
      arrow-up
      1
      ·
      3 days ago

      I started using regex because i need to rename a lot of my pirated media from “this_episode_uploaded_byXxXSuperEl33tSqwaaadXxX_MLP_s04_Episode7_bats.mkv”

      and linux deals with it very nicely. Much better than manual, anyways