code: private String convertPerlToJavaRegex(String regex) {
  		regex = regex.substring(1);
  		int lastIndex = regex.lastIndexOf('/');
  		regex = regex.substring(0, lastIndex);
  		return regex;
  	}
docs: Converts a PERL style regex into the Java style. That means in removes the leading and the last / and removes the modifiers
  
  @param regex
  @return