Ad
  • Custom User Avatar
    • No sample tests

    • No fixed tests

    • The description is unclear of what we should do. (Only clear thing is to return a 2-dimensional array)

  • Default User Avatar

    let match = str.match(new RegExp(town + ':.?(?:\n|$)', 'i'));
    In this line you can replace ':.
    ?(?:\n|$)', 'i' with just '.+'

    But this RegExp (/\d+(.\d+)/g) is really good