Read the statement by Michael Teeuw here.
Volvo on Call
-
@sdetweil Thank you for the explanation. Is the function executing
voc list
in the terminal? If I’m doing manuallyvoc list
I’m getting a result.Is there a way to see what the script is getting back in detail?
Again, thank you very much!
-
@mz-ber yes executing just like on console
nothing built in to show results.
but you could add a
console.log(sdo)
before the call to listResults()
and see it where u start mm
npm startit should be the same outout
-
@sdetweil Alright, I added the console.log before the call
listResult()
and it is getting the details from my car. I feel sooo close to get this running but I dont know where it is stuck. :anguished_face:Is maybe the regex search not getting the details viewed?
listResult: function(output) { var re = /^([^ ]+)\s\(([^\)]+)\)\s([^ ]+)$/gm
-
@mz-ber so the regular expression isn’t finding your text
/^([^ ]+)\s\(([^\)]+)\)\s([^ ]+)$/gm
I use this for building and testing rejects
-
@sdetweil Yes, I also checked that with regex101. Can I just parse in the details I have?
listResult: function(output) { var re = B-PY 186 (V90) XVASS123345
-
@mz-ber the regex returns an array of matched things
-
@mz-ber i think the regex is not expecting the 186
try ths one
/^([^ ]+)\s.*\(([^\/]+)\/([^\)]+)\)$/gm
start of string ^
capture up to the 1st space ([^ ]+)
skip everything to (and including) the open paren \s.*(
get the two things in the parens, separated by /, not including the parens
capture up to the slash ([^/]+)
skip the slash /
capture up to the close pareen ([^)]+)
skip the close paren )
end of string $ -
@sdetweil Your one is not working. Here are the details I try to get:
B-PY 186 (V90/2019) YV1PWAKUDK1XXXXXX
I also played a bit with the expression and removed the white space:
before:
listResult: function(output) { var re = /^([^ ]+)\s\(([^\)]+)\)\s([^ ]+)$/gm
after:
listResult: function(output) { var re = /^([^]+)\s\(([^\)]+)\)\s([^]+)$/gm
That is working based on regex101 and I dont get the error anymore. But nothing is loaded into the MM
-
@mz-ber the regex has to return 3 items
-
@sdetweil Right! And I guess it is doing so? Or am I wrong?