-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Project search breaks on regex lookbehind/lookahead group constructs #13486
Comments
Hey,
I know you're asking for some feature in general (and not for solving a specific use case), but we do support running searches in a selection now. This should allow you to select the last 2 lines in a file and run your query on just these lines. |
I don't understand why you are closing this as not planned. There are multiple ways to do better here than just close the issue:
As an anecdotal sample, In the last couple of weeks, both me and my immediate colleague have been using regex searches with lookbehind/lookahead group constructs to do find and replace refactoring in projects with hundreds of modules. It's not an edge case thing; today I had to fire up VS Code and use its regex find and replace because Zed doesn't have the capability. |
I, too, would like to see "look ahead" and "look behind" support in the search. This issue would be a UX defect/bug/issue. However, there is also a feature request here. I hope we can capture both intents. |
The lack of information about my Regex being "wrong" was driving me nuts. I thought I was doing something wrong when trying to create a lookbehind regex, because Zed was giving me a red box, indicating that the regex is wrong, but its not actually wrong, its not supported. It should have this information in the docs or an actual UI message telling that this is not supported (maybe another color, such as orange/yellow). |
please, we also want to fully switch to zed, but hickups like (notebook not supported, and regex don't work even as sublime) these are holding that to happen, now I am on a verge to uninstall it, as I am just carrying it's installation in my PC without using it(waiting for it to support) things which are really necessary. and it's not really me, every zed user have same issues Please release a version where we can switch ASAP |
This is definitely a basic function needed. |
A possible solution for user-given patterns is: always use (I'm assuming that Keeping |
It would be really nice to have this feature. It's very powerful for mass search / replace. A bit "niche" in terms of addressable user base, but definitely an important power-feature. |
Came here to find this... Do I care if an algorithm is "inefficient" for a computer when the alternate is it being very inefficient for me to manually do stuff? Not one bit. Please reconsider. |
Check for existing issues
Describe the bug / provide steps to reproduce it
With this sort of regex search query using negative lookbehind:
I would expect to be able to match in the last two lines:
But the Zed search input becomes red, and refuses to search when there is regex negative lookbehind syntax in the search query:
It's super useful to be able to use regex lookbehind/lookahead group constructs when project searching while refactoring.
Environment
Zed: v0.141.2 (Zed Preview)
OS: macOS 14.5.0
Memory: 64 GiB
Architecture: aarch64
If applicable, add mockups / screenshots to help explain present your vision of the feature
No response
If applicable, attach your
~/Library/Logs/Zed/Zed.log
file to this issue.No response
The text was updated successfully, but these errors were encountered: