fork download
  1. print(string.match("/v1/resource1", "^/v1/resource%d*$"))
  2. print(string.match("/v1/resource1/{uuid}", "^/v1/resource1/.[^/]*$"))
  3. print(string.match("/v1/resource1/{uuid}/testar", "^/v1/resource1/.[^/]*$"))
  4. print(string.match("/v1/resource1/{uuid}/resource2", "^/v1/resource1/[^/]*/resource2$"))
Success #stdin #stdout 0.01s 5288KB
stdin
Standard input is empty
stdout
/v1/resource1
/v1/resource1/{uuid}
nil
/v1/resource1/{uuid}/resource2