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

How to delete earlier versions of a saved regex? #2324

Open
fade2gray opened this issue Aug 15, 2024 · 5 comments
Open

How to delete earlier versions of a saved regex? #2324

fade2gray opened this issue Aug 15, 2024 · 5 comments
Labels

Comments

@fade2gray
Copy link

Question

For example, you have saved a regex, changed it and saved it as a new version. You wish to keep the 2nd version and delete the 1st, but the only options are, to delete all versions or delete the second.

How do I delete any saved version/s before the last version?

@Banaanae
Copy link

Select the regex version you want to delete (Under save and share), then press delete
They should add the ability to delete any regex version, even if its not selected

@fade2gray
Copy link
Author

Maybe I didn't explain myself very well.

If I create and save a regex and make 3 more edit/saves, I end up with 4 versions, It's not a simple task, for example, to delete versions 1, 3, and 4 to leave version 2 as the only version.

Yes, I can delete v4 followed by v3, but I then can't delete v1 to leave v2. Unless I'm misunderstanding something, it seems the only way to achieve this, is to revert to v2 under the Save and Share menu, copy and save the regex and test string to a new regex101 instance, and then delete the previous save and all its versions.

@Calorion
Copy link

If what you want is just to be able to share a single link and have that bring up the latest version, you can do that just by leaving the version number off the link, as in https://regex101.com/r/JzRI2C/ instead of https://regex101.com/r/JzRI2C/23.

@working-name
Copy link
Collaborator

An option might be to save new regex rather than update regex and that way you start a new ID/tree.

@firasdib
Copy link
Owner

Are you signed in? If you go to the version you want to delete, and you're the owner of it, you should be able to delete it.

The way it works is as follows:

When you save a new regex, the delete code for the permalink and specific version is saved to your account and browser

When you reopen the same permalink, and open the delete dialog, the saved entries in your browser are fetched and displayed. If there are none (maybe browser cleaned them out, etc), it will fall back to the ones returned by the API for you (if you are signed in). The API only returns the codes for the currently active version.

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

No branches or pull requests

5 participants