- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I want to change all lines that begins with "#" to change into a direct NC-Code:
Check tool!
#Q215=2
should look in the NC-Code:
;Check tool <-- Comment
Q215=2 <-- NC-Code
I tried a little bit with this post:
but I don't get it to work.
Can someone help me with this?
original PP:
if (properties.showNotes && hasParameter("notes")) {
var notes = getParameter("notes");
if (notes) {
var lines = String(notes).split("\n");
var r1 = new RegExp("^[\\s]+", "g");
var r2 = new RegExp("[\\s]+$", "g");
for (line in lines) {
var comment = lines[line].replace(r1, "").replace(r2, "");
if (comment) {
writeComment(comment);
}
}
}
}
Solved! Go to Solution.