resourcejs icon indicating copy to clipboard operation
resourcejs copied to clipboard

The regex doesn't work as well

Open Dmytro15 opened this issue 4 years ago • 0 comments

When I create the resource with for example field path with value "someText/someText" (with slash) and I want to get all resources which DON'T have slash by regex (apiUrl/resource?path__regex=/^((?!/).)*$/g ). I get a wrong result((( I get all resources also which don't match with regex. As I understand it's a BUG. This BUG is in this line When you match regexes you get wrong parts because in the example regex has 3 slash This is console.log(parts). As you see we have wrong match(( [ '/^((?!\\/).)*$', '^((?!\\', ').)*$', index: 0, input: '/^((?!\\/).)*$/g', groups: undefined ]

Dmytro15 avatar Feb 01 '21 16:02 Dmytro15