Help Parsing
-
i need to parse some strings from source. the left string is always the same but the right string is either " sign or & sign.. is thre anyway to parse? both of these available in the same page so, is there a way to add instructions to openbullet to parse when right string is " or & whichever comes first?
-
I see a couple of options here
- Use regex.
- 2 parse blocks, and some loliscript. If the first comes up empty, parse again using the other one on the same output variable.
-
@Ruri Thank you for sparing some time... But the problem is most of the time... Both these types of contents available in the same page and sometimes " and & available in same data set I want to parse... What I want is to parse the line up to either of right strings whichever comes first... I think I will be able to get this done with regex... I will try and post here.... thank you very much for your opinion Ruri....
-
Yes regex will work in this case. If you're struggling post some samples and I'll help you build it
-
@Ruri thank you very much... I will first try to do it and if I fail, I will ask for some help... Thank you again... Love your work... Best of luck with your exams and all... I have a pretty good idea, how much of a stress one can face when facing exams...
-
this regex will help you
constant(.*?)"|constant(.*?)&
Replace constant with whatever data you capture starts with
the Regex will capture either the first data or the second one
-
@Fairy thank you very much... This is a big help...
-
You're the most welcome baby
-
@Fairy hi I encountered a problem... Take this as example
"http://www.example.com/index.php?id=8&a=8"
What I want is this regex to select from http to & character but it selects upto last " character
"http://www.example.com/index.php?id=8"
In this example the regex has to select upto last " character..
help please...
Thanks in advance...
-
@sprvln This just an option, it will filter anything between (http or https) and (&, ")
(http.*)(php\?id=[0-9]{1,})
-
@Br4uN thanks for the help... I will try to use this as and example...
-
Tried a lot. Couldn't find a properly working regex... Got around by adding a function tab to remove unwanted using regex to select and replacing with nothing...