Regex101 icon indicating copy to clipboard operation
Regex101 copied to clipboard

How to delete earlier versions of a saved regex?

Open fade2gray opened this issue 1 year ago • 5 comments

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?

fade2gray avatar Aug 15 '24 17:08 fade2gray

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

Banaanae avatar Aug 20 '24 04:08 Banaanae

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.

fade2gray avatar Aug 21 '24 13:08 fade2gray

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.

Calorion avatar Aug 24 '24 00:08 Calorion

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

working-name avatar Aug 24 '24 14:08 working-name

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.

firasdib avatar Aug 24 '24 15:08 firasdib

Closing for now, please reopen if you feel this is not resolved.

firasdib avatar Apr 29 '25 18:04 firasdib