fix lastindexof search regex