Jump to content
Ketarin forum

Search for beautiful Regex (to help newbies)


Omniferum
 Share

Recommended Posts

  • 1 month later...
  • 4 months later...
  • 2 years later...

I've found a few apps recently that require the dot-release for the download path, but the version number is displayed with ".0" if, and only if, it's the initial release. To get around this I'm using a versionstub variable which captures the initial version (such as "12") and then a regex to check if it's ONLY numbers and appends .0 to it if necessary. Here's the code:

 

{versionstub:regexreplace:^(\d+)$:$1.0}
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.