Reputation: 23
To visualise 3D images using X3DOM(https://doc.x3dom.org/tutorials/index.html) in HTML/JAVASCRIPT, I have to convert them into .png + AtlasDim.txt files. An example of an AtlasDim.txt file contains: (148, (13, 13)). I have to parse this line to get automatically in an array:
arr[0]=148
arr[1]=13
arr[2]=13
It appears that regular expression are suited for this kind of problems, however I didn't figure out how to write a good regular expression for this. Any one can help please?
Upvotes: 0
Views: 29
Reputation: 12355
Just use a global regex \d+
. It's that simple ;-)
https://regex101.com/r/6wqdsr/1
Upvotes: 1