I can only hope this would be more clear after reading the thread I linked, but I don’t think it will be. As was said there, the pattern is tried as both (regexp and wildcard), and if either style matches, it’s a match.
EDIT: if this helps:
Net name is put through regular expression pattern matching engine with your pattern. If the net name matches the pattern interpreted as regular expression pattern, the net name matches your pattern.
Net name is also put through wildcard pattern matching engine with your pattern. If the net name matches the pattern interpreted as wildcard pattern, the net name matches your pattern.
It’s inclusive OR, i.e. one or both can be true for the result to be true, and the order of the tests doesn’t matter.
Alright, I could achieve the desired thing with this, but this is not reliable because if the signal ends with D1 or anything that is not + or - it will match.
Netclasses - Wildcards - #4 by itsko tells that the syntax is here: wxWidgets: Regular Expressions. I’m not a regexp expert, maybe someone else can help. It really wouldn’t hurt to have examples in KiCad documentation for common cases… the naming style used in net names is usually limited and similar patterns would be often found.
You need to go look at some regex reference documentation if you want to understand why what you tried doesn’t work. You’re looking for .*USB_conn_D[+-] for local labels.
Yes… I’m giving you a regular expression to solve your problem. You can’t do the thing you want with wildcards (select the ones ending in +/- but exclude the ones ending in something else).
Nothing is wrong: putting in USB* won’t match any local labels because all local labels start with a sheet path (/ on root sheet, etc)
Sure, I don’t want to use wildcards. I want to use regexp. But the regexp was not working.
Now, with the dot in front, it looks like it worked. I am going to neeto to test it more.