ZC

hi peter
该组节点的模式模式是否支持Maya的完整正则表达式?
是这个匹配命令支持的所有正则表达式。
如果可以,希望这个点节点和arrayExpression节点也可以支持完整的Maya正则表达式

匹配任何单个字符
*匹配前面表达式的零个或多个出现
+匹配先前表达式的一个或多个出现
^ 将表达式匹配(锚定)到行的开始
$匹配(锚定)表达式到行尾
\转义字符 当您希望匹配实际的字符时,将其用于特殊字符前(例如“*”)。请注意,MEL字符串解析在首次解析时使用“\”的控制字符。因此,要在表达式中使用“\”字符,必须将其转义(例如“\\”),以便将其传递到匹配项。
[...]匹配任何一个附带的字符。除“\”和“]”之外的所有特殊模式匹配字符 在括号之间失去他们的特殊意义,并且匹配自己。由“ - ”分隔的一对字符匹配任何字符之间的字符串,包括(例如“[0-9]”匹配任何数字)。如果开头后面的第一个字符“[”是“^”,任何不包含的字符都匹配(例如“[^ ab]”将匹配除“a”或“b”之外的任何字符)。将“ - ”作为第一个或最后一个字符放在字符集中。
(...)用于组合

表达的一部分谢谢你,彼得!

Quote 0 0
pshipkov
I can expand the regex support but will need specific examples i can work towards.
If you can provide such that will simplify things on my side.
Quote 0 0
ZC

It is my idea. Now my work does not need to use regular expressions to place. However, if these nodes of soup can support regular expressions, I think it is very cool and very convenient for our workflow.
Such as group this node. Always feel it is not very convenient, lack of certain flexibility.
For example, writing ^ 2 [4-9] 5 $ can let us choose some special components.

In fact, we can not use the regular expression of Maya, you can use the more popular and complete regular expression. Or you can create a regular expression that only belongs to soup according to your own ideas. It's a special language for soup. It is only used to match the array of numeric types. Because soup's most powerful feature is the operation of array data. You used to create a new programming language is very complex and difficult, and similar to the regular expression of such a language to create may be relatively simple bar.

Well, soup should probably have a set of their own language, it is simple, powerful, flexible. Do not have to learn complex programming syntax and logic. It can be used in all the expression nodes of soup. ArrayExpression, group, pyExpression, point, etc., and other nodes that will be added in the future.

Or my idea is too outrageous. But I hope that soup is getting stronger and stronger, at least I feel my job is no longer soup. You are great and i will always support you. Come on!  :)

Quote 0 0
pshipkov
Group's "pattern" field supports "*" and ":" and " " (space).
* for all components
x:y for range of components
Example: 5:10 15:20
But i can add the "^" one too.
So far no one requested more options that's why things are the way they are.

You can grab the arrays of the arrayExpression node. But have to be careful or you can mess things up for good. :)
You can use the $a#_ARREXP variables to gain access to the arrays. This is for scalars.
For vectors you use $ax#_ARREXP, $ay#_ARREXP, $az#_ARREXP.
Keep in mind that the first array does not have an index.
So it goes like this:
$a_ARREXP
$a2_ARREXP
etc.

ArrayExpression supports the full set of regex in MEL.
Quote 0 0

Add a Website Forum to your website.