It is currently March 28th, 2024, 4:09 pm

regexp conditionals

Get help with creating, editing & fixing problems with skins
Post Reply
Zaragan
Posts: 58
Joined: January 10th, 2015, 3:14 pm

regexp conditionals

Post by Zaragan »

Another day, another help i need. I'm trying to parse channels on a discord server using the position on it but always parse the same channels regardless the position io give, toughts?

Code: Select all

[Variables]
chann0="(?(?=.*"position": 0,).*"name": "(.*)")"
chann1="(?(?=.*"position": 1,).*"name": "(.*)")"
[measureIP]
Measure=Plugin
Plugin=WebParser.dll
Url=https://discordapp.com/api/servers/388033718025060353/widget.json
UpdateRate=1000
RegExp="(?siU).*{"channels": #chann0##chann1#"
StringIndex=1
LogSubstringErrors=0

[measureChannel1]
Measure=WebParser
URL=[measureIP]
StringIndex=1

[measureChannel2]
Measure=WebParser
URL=[measureIP]
StringIndex=2

[1]
Meter=STRING
MeterStyle=styleRightText
MeasureName=measureChannel1
X=200
Y=0r
W=190
H=14
Text="%1"
[2]
Meter=STRING
MeterStyle=styleRightText
MeasureName=measureChannel2
X=200
Y=60
W=190
H=14
Text="%1"
User avatar
FreeRaider
Posts: 826
Joined: November 20th, 2012, 11:58 pm

Re: regexp conditionals

Post by FreeRaider »

Try

Code: Select all

[Variables]
chann0="(?(?=.*"position": 0,).*"position": 0,.*"name": "(.*)")"
chann1="(?(?=.*"position": 1,).*"position": 1,.*"name": "(.*)")"
Post Reply