make regex parsing more lenient