CodeCode wrote: ↑February 7th, 2023, 2:04 am
Hello,
I have been getting percent illuminated from http://iohelix.net/moon/moonlite.xml
From what I can see, a lot has changed over the weekend.
If anyone can help restructure the regexp, it would help a lot.
The new data isnt really very long, I just don't do this kind of thing very often.
Thanks for any help.
Tweak the very end of the regexp, like so: ...</nextPhase>.*</moon> (i.e., insert the bit in red).
This regexp looks like it was originally intended to grab a lot more data than just the percentage illuminated (it grabs the phase too, but not sure if you are using it). But if that is all you want, you can greatly simplify the expression by just using one or the other of the following:
CodeCode wrote: ↑February 7th, 2023, 3:11 am
Hi SIlverAzide.
This RegExp=(?siU)<percentIlluminated>(.*)</percentIlluminated> works great, but the log shows "not enough substrings".
Which actually does not matter to me very much but if I update this in DevArt end users might shy away from it.
Anyway, thanks for the help, and working solution!
The "not enough substrings" error is why I gave you two choices. Your post only showed one substring being used and two being captured, so I gave you the second option in case you were using both captures.
SilverAzide wrote: ↑February 7th, 2023, 3:15 am
The "not enough substrings" error is why I gave you two choices. Your post only showed one substring being used and two being captured, so I gave you the second option in case you were using both captures.
I was, Just forgot. I was using the full or new phase to set a binary so the correct side of the moon was illuminated for either hemisphere of the planet. (north or south).