swap regex for indexOf