Pattern matching(패턴매칭)
String patterns
You can use string patterns anywhere an expression function needs a name (such as a parameter or node name) to match multiple things at once.
* |
Matches any string. |
? |
Matches any single character. |
[chars] |
Matches any of the characters between the square brackets. This does not support character ranges using a hyphen (you cannot do ). |
^pattern |
Removes strings matching pattern from the previous match. |
@pattern |
Matches object group, channel group, and/or bundle (depending on context). |
Examples:
geo* |
Matches everything beginning with “geo”. |
[gG]eo* |
Matches everything beginning with “geo” or “Geo”. |
?eo* |
Matches everything that has any character followed by “eo” and then any number of characters. |
* ^geo1 |
Matches everything except the string “geo1”. |
Numeric patterns in the Group node
* |
Matches all points/primitives. |
number |
Matches a single number. |
start-end |
Matches all numbers in a range (inclusive). |
start-end:step |
Matches all numbers in a range, matching only every stepthe number. |
!pattern |
Matches everything except pattern. |
^pattern |
Removes numbers matching pattern from the previous match. |
Examples:
10-20 |
Match numbers 10 through 20 (including 10 and 20). |
0-30:2 |
Match every other number between 0 and 30 (0, 2, 4, 6, … 30). |
0-30:2,3 |
Match every 2 of 3 numbers between 0 and 30 (0, 1, 3, 4, 6, 7, … 30). |
!3-5 |
Match everything except 3-5. |
0-100:2 ^10-20 |
Match every other number between 0 and 100 except for numbers between 10 and 20. |
Notes
-
Separate multiple patterns with spaces. Commas are not allowed as separator characters.
Comments
Happy_Challenge
Tue, 06/30/2009 - 18:24
Permalink
오타 확인해주세요~
Numeric patterns in the Group node의 Example에서 이부분-
0-30:2,32,3 이면 [0, 2, 3, 5, 6, 8, 9, … 30] 이든지 0-30:1,3 이어야 맞는 것 같아서요~
We are the Captains of our souls.
Houdini
Mon, 07/06/2009 - 01:03
Permalink
파라미터창에 입력해 보고..
리턴되는 값을 취하시면 될거 같습니다. SESI 도움말을 grab한거라 문제가 있을 수도 있어요. 암튼 좋은 지적 감사합니다. 꼭 확인해서 스샷 부탁드립니다.
Happy_Challenge
Tue, 07/07/2009 - 21:20
Permalink
확인한 내용 올려놓았습니다
파일 첨부가 안되서 북페이지에 같이 올려놨습니다.
첨부해서 이미지링크하는게 좋더라구요 ㅎㅎ
제목은 '패턴매칭의 오해' 입니다.
We are the Captains of our souls.