JuliaComputing / JuliaHub-Feedback

Public repo for filing JuliaHub issues
6 stars 1 forks source link

negative lookahead in repo search not working #115

Closed simeonschaub closed 3 years ago

simeonschaub commented 3 years ago

See https://juliahub.com/ui/RepoSearch?q=find%28%3F%21first%29&r=true for example, I expected to find occurances like findall. Is there any way this could be supported?

pfitzseb commented 3 years ago

No, or at least not without substantial engineering effort. We're using the RE2 regex engine for that part of our search, which is somewhat limited compared to Perl or PCRE. See here for the supported syntax.

simeonschaub commented 3 years ago

Newer regular expression facilities (notably Perl and those that have copied it) have added many new operators and escape sequences, which make the regular expressions more concise, and sometimes more cryptic, but usually not more powerful.

Well, I'd disagree with the last part :smile:. I can probably live without this feature for now though.

pfitzseb commented 3 years ago

Well, I think you can usually emulate lookaheads with e.g. find([^f].*|f[^i].*|fi[^r].*|fir[^s].*|firs[^t].*) in your example, but that's of course pretty awful.