Parsing a variable for a capture
-
How would I parse a variable like this
Live 18 : False, Live 16 : False, Live 17 : False, Live 14 : False, Live 15 : False, Live 12 : True, Live 13 : False, Live 10 : False, Live 11 : False, Live 9 : False, News : True, Live 7 : False, Live 8 : False, Live 5 : False, Live 6 : True, 4 : True, 3 : False, 2 : False, 1 : False
I would like to capture only each one that has True like this
Live 12 : True, News : True, Live 6 : TrueThanks in advance!
-
anyone have a solution?
-
Hi @castew,
What have you tried on your side?
-
Try this :
PARSE "<SOURCE>" LR ", Live 12 : " "," -> VAR "" "Live 12 : " ""
PARSE "<SOURCE" LR ", News : " "," -> VAR "" "News : " ""
PARSE "<SOURCE>" LR ", Live 6 : " "," -> VAR "" "Live 6 : " ""
-
I have tried to figure out a regex for it ( I am hopless on that) I would do the LR parse but it is not a constant on which ones have a true and false. I would just like to cap the ones that say true and not any that have false
-
@castew
You could use this regex and select Recursive, final result will be a listPARSE "<SOURCE>" REGEX "((Live\\s)|[0-9]{1,3}\\s[:])+\\s(True)" "[0]" Recursive=TRUE -> VAR "MyCapture"
-
@Br4uN said in Parsing a variable for a capture:
PARSE "<SOURCE>" REGEX "((Live\s)|[0-9]{1,3}\s[:])+\s(True)" "[0]" Recursive=TRUE -> VAR
Thank you very much!!
-
@Br4uN hey bro how do you conveert it to regex PARSE "<SOURCE>" REGEX "((Live\s)|[0-9]{1,3}\s[:])+\s(True)" "[0]" Recursive=TRUE -> VAR
i want to learn it please