solves problem with reg exp