 
   output = input.replace(/[\[\]\\\^\$\.\|\?\+\(\)]/, "\\$&")
   if output[0] == '*'
-    prefix = '/'
     output = output.replace(/^\*+/g, '')
   else
-    prefix = '/^'
+    output = '^' + output
 
   if output[output.length - 1] == '*'
-    suffix = '/'
     output = output.replace(/\*+$/g, '')
   else
-    suffix = '$/'
+    output = output + '$'
 
   output = output.replace(/[\*]/, '.*')
 
-  return eval(prefix + output + suffix)
+  return new RegExp(output)
 
 
 normalizers = {}


normalizers.string = (input, normType) ->
  if normType is 'query'
    if /^\/(.*?)\/(g?i?m?y?)$/.test(input)
      return [{'$regex' : eval(input)}, input]
  input


colonizeMac = (input) ->

  if input.length == 17
    return input

  return {'$regex' : new RegExp(input)}


exports.normalize = (path, value, normType) ->
