Jfp87
09-02-2016, 05:52 AM
Guys,
I have a list of node names in a table column. I am trying to parse the list to show that each node name matches a particular format. The format is as follows:
Format 1) n[1-100]-[1-20]-[1-10] OR
Format 2) n[1-100]-[1-20]
I.e., the node name can have three parts (format 1) or two parts (format 2), but not one part. The first part is always prefixed by "n".
Some examples:
n1-1
n1-1-1
n100-20-10
n87-14-2
n50-4
It's the pattern matching which is bogging me down. I think I can get it to match the pattern using simple string functions like Len, Right, Mid, InStr etc., but is this the best way - what about RegEx?
Joe
I have a list of node names in a table column. I am trying to parse the list to show that each node name matches a particular format. The format is as follows:
Format 1) n[1-100]-[1-20]-[1-10] OR
Format 2) n[1-100]-[1-20]
I.e., the node name can have three parts (format 1) or two parts (format 2), but not one part. The first part is always prefixed by "n".
Some examples:
n1-1
n1-1-1
n100-20-10
n87-14-2
n50-4
It's the pattern matching which is bogging me down. I think I can get it to match the pattern using simple string functions like Len, Right, Mid, InStr etc., but is this the best way - what about RegEx?
Joe