I want to remove a part of a string following what matches my regex.
I am trying to make a TV show organization program and I want to cut off anything in the name f
This should work
.*[Ss]\d\d[Ee]\d\d
In java (I'm rusty) this will be
String ResultString = null; Pattern regex = Pattern.compile(".*[Ss]\\d\\d[Ee]\\d\\d"); Matcher regexMatcher = regex.matcher("Title S11E11Blah"); if (regexMatcher.find()) { ResultString = regexMatcher.group(); }
Hope this helps