regex fixes to rw