removing regex modifiers to make it java compatible