2 Matching Annotations
  1. Apr 2025
    1. One important thing to remember is that in regular strings the \ character needs to be escaped while in the regex literal (usually) the / character needs to be escaped. So /\w+\//i becomes new RegExp("\\w+/", "i")

      Easier/prettier in Ruby than JS

  2. Mar 2021