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 |