Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The actual result of toRegex dosen't match the document,missing symbol ^$ #130

Open
EAGzzyCSL opened this issue Mar 6, 2024 · 0 comments

Comments

@EAGzzyCSL
Copy link

document example

link: toRegex

const picomatch = require('picomatch');
// picomatch.toRegex(source[, options]);

const { output } = picomatch.parse('*.js');
console.log(picomatch.toRegex(output));
//=> /^(?:(?!\.)(?=.)[^/]*?\.js)$/

actual result

image

missing symbol ^ & $ and with other differences

- /^(?:(?!\.)(?=.)[^/]*?\.js)$/
+ /(?!\.)(?=.)[^/]*?\.js/

version

both v3 and v4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant