1 min readfrom Microsoft Excel | Help & Support with your Formula, Macro, and VBA problems | A Reddit Community

REGEXTEST gives strange results

So I'm using a regex for version numbers since I want everyone to use the same format and not one person writing "Version 1" and another "1.0". My regex for this is "^(\d+\.)+\d+$" and it accepts version numbers like "1.0" or "2.0" or "1.0.3.5" but for some reason gives an error message when there's no 0 after the first period like "1.2" or "2.7". Except when the first number is a zero like "0.8".

I have absolutely no idea why this happens. I've also tried different variations of this regex like replacing \d with [0-9] or leaving out the start and beginning symbols but nothing changed. All online regex editors say my regex should be correct and the company AI also can't find any issues with it.

Does anyone know why the hell this is happening?

submitted by /u/Keplars
[link] [comments]

Want to read more?

Check out the full article on the original site

View original article

Tagged with

#Excel alternatives for data analysis
#natural language processing for spreadsheets
#generative AI for data analysis
#financial modeling with spreadsheets
#rows.com
#Excel compatibility
#row zero
#Excel alternatives
#regex
#version numbers
#format
#error message
#pattern
#accepts
#variations
#digits
#period
#company AI
#different variations
#validity