Metacharacters & Characterclasses for "- (String)" Node

hello…

it would be nice if the - (string) node would support similar characterdefinitions as in regexpr. at the moment, you have to create a “- (String)” node manually
for each string you want to subtract.

for example take this spread:

abcd23
xyz12
34qwertz

i like to subtract all numbers of each index…
it would be nice to feed the operand2 inlet with something like /d.

or maybe theres a clever node combination (with regexpr ad string spectral etc…)
of which i have no clue???

clueless
ele meier

i think RegExpr should be able to do this trick. I have added some text to FAQ RegExpr The main question is how to deal with malformed inputs - can they occur, should they generate additional slices, should they be ignored etc…

thank you for the regexprtutorial.

hmm, my description of the problem in my previous post was really unclear.
regexpr acts as a filter which just let pass strings that mach the definition. and it creates a new silceindex for every match. im looking for a way to subtract strings without affecting the slicecount.

if, for example, an index contains a string which doesnt match, the outputspread of regexpr has a different slicecount. while “- string” has no affect to the slicecount.

heres a better example:

abcd23,
xyz12,
1223,
34qwertz (Slicecount 4)

|
|
v

regexpr with (\D*)

|
|
v

abcd23,
xyz12,
34qwertz (Slicecount 3)

a “- (String)”-node which would accept for example /d* as operand2, could solve the problem.

yes. thats why i said, the main question is how to deal with malformed inputs… what do you want to get from (abcd23, xyz12, 1223, 34qwertz) ??
(abcd, xyz, , qwertz) ??

i think the start of line and end of line tokens $ ^ will help you. of maybe prefixing all strings with a separate token…

i actually already logged a feature request for a pin at the regexpr node, which would return the orginating slice index of a given output slice. but this will not make it into the next release (which will be released REAL SOON NOW)

how about so: