protected boolean doStripRegexMatch ( StringBuilder url , Matcher matcher ) { if ( matcher != null && matcher . matches ( ) ) { url . delete ( matcher . start ( 1 ) , matcher . end ( 1 ) ) ; return true ; } return false ; }
Run a regex against a StringBuilder removing group 1 if it matches .