I have mentioned it in the comments below, but to explain it simply, I just wanted to remove all the bracketed text + a dash if there is no other text.
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
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:
(?:^-\[[^[]+\]$| ?\[.+?\] ?)I could use a use case. RegEx are pretty “what does it mean” without what it’s targeted on.
I have mentioned it in the comments below, but to explain it simply, I just wanted to remove all the bracketed text + a dash if there is no other text.
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