Iโve gotten to the point where I can run my script and I can see the item that I need - but I have no idea how to access this info.
Iโve got a regex.exec() that runsโฆ
I have tried:
var endPoint = regex.exec(body).index;
Thanks so much!
Solved! Go to Solution.
I think I figured it out.
I was trying to do it all in one shot, as in:
var endPoint = regex.exec(body).index;
var regExRun = regex.exec(body);
var endPoint = regExRun.index;
Iโm the type to reduce things to itโs simplest terms if possible; seems that bit me in the ass this time.
How so? Something is being output to the endPoint variable? What is it?
See screen shot with big red arrow (^_^)
Thatโs a screenshot from the debug window where I stopped it right after that variable was set.
I need the index value - thatโs the character number of where the regex was found.
So endPoint = โIndex: 4123โ ?
Thatโs what Iโd like to end up withโฆ how do I get it from a regex array result - when Itโs not part of the array.
Have you tried:
regex.exec(body).endpoint.index
It would seem to me to that endpoint is another level array and then index.
FYI this did not work:
Thanks. I did not consider the Run part. I usually donโt work with regex much.
I think I figured it out.
I was trying to do it all in one shot, as in:
var endPoint = regex.exec(body).index;
var regExRun = regex.exec(body);
var endPoint = regExRun.index;
Iโm the type to reduce things to itโs simplest terms if possible; seems that bit me in the ass this time.
User | Count |
---|---|
40 | |
34 | |
29 | |
23 | |
17 |