Java regex to match 1 to 2 group excluding anything inside (and including) brackets and paranthesis
I have a sample list of file names: Heroes (2006) - s01e01 - Genesis.mp4 [Not-Important] One Piece - s22e48 - 1178 [More_not_important].mkv Stargate s01e01.mkv Stargate the Movie.mkv Star-Trek s01e01.mkv (Not_Important) Star_Trek_the_Movie (Some-More).mkv and I have this Java regex pattern (?:^[\[\(].*?[\]\)])?(.*?)([sS]\d+[eE]\d+)([^.]*) which resulted: Match 1 => Heroes (2006) - s01e01 - Genesis Group 1 => Heroes (2006) - Group 2 => s01e01 Group 3 => - Genesis Match 2 => [Not-Important] One Piece - s22e48 - 1178 [More_not_important] Group 1 => One Piece - Group 2 => s22e48 Group 3 => - 1178
0 upvotes
View original discussion ↗
Comments
Sign in or sign up to comment and upvote.
No comments yet.