public static String preg_replace ( String regex , String replacement , String subject ) { Pattern p = Pattern . compile ( regex ) ; return preg_replace ( p , replacement , subject ) ; }
Matches a string with a regex and replaces the matched components with a provided string .