Use `rx' to make some regular expressions.
Fix compile error with commit 706b92f