jsmorley wrote: ↑December 7th, 2019, 8:26 pm
So it does... I'd never really played with it before, and didn't tumble to the fact that is in effect a [:class:] within a [class]. Nice.
I also don't really use them since [A-Z] is just easier to type than [[:upper:]] anyway lol. Not really what you want from a shorthand lol.
Posix character classes aren't normal bracket expressions, they're a different thing that are used in the same way because hey lets make things even more confusing?
for measures the easy way to overcome it is to lua it (unless you take the time to make 26+ substitutions so it's native), for meters the easy way is to inline pattern it
Jeff wrote: ↑December 8th, 2019, 12:11 am
regexp substitution
"(.)(.)":"\U$1\E$2"
this won't work in rainmeter
for measures the easy way to overcome it is to lua it (unless you take the time to make 26+ substitutions so it's native), for meters the easy way is to inline pattern it
Yea, unfortunately there's no way to do that, that's a regex101 exclusive thing. IDK why they made an exclusive thing for a regex tester but hey.
All those regular expression tools online want me to insert my regular expression first. Are there any tools that help to come up with regular expression at the first place?
I need to get two number values. One is edition of X and another is Y remaining. Can I feed my html code to some tool and get the X and Y indicated somehow?
If what you are saying is that you would like to paste in something like <item>11</item> and then ask it "what is the regular expression I need to get the "11" out of this?" then no, I don't know of a tool that does that offhand. There may be something, just have never run into it. Every regular expression tester I have seen is more "did I do this right?" than "how do I do this?".
RainRegExp works pretty well too, and has the advantages that 1) It can connect to and download the actual site you are trying to parse, and 2) It is automatically very "Rainmeter-centric", in that it uses the same PCRE library and global flags that Rainmeter uses, and is focused on (StringIndex) "capture groups" rather than "matches". The downside of RainRegExp is that it doesn't give you the very cool and extremely useful "explanation" of what is happening and why that regex101.com does. If your goal is to "learn" how regular expression works, then regex101.com is a great tool.
You do not have the required permissions to view the files attached to this post.
For smaller strings, txt2re works reasonably well.
For your example, it spits out .*?(\d+) which works fine in a webparser measure, but wouldn't work in a string measure as is. Though for smaller strings it's faster to just write a regex that works anyway.