bug fix when using regex containing a forward slash