该帮助的版本不再更新,请参见https://www.jmp.com/support/help/zh-cn/15.2 获取最新的版本.


When a pattern isn’t working the way you expect, use Log() to send pieces of the match to the JMP log. The following example shows how to debug pattern matching and rewrite a script to account for the white space between words in the phrase “the quick brown fox”.
word = Pat Repeat( Pat Not Any( " " ) );
Pat Match(
"the quick brown fox",
Show( a, b, c, d );
The output is probably not what you want, given the name of the pattern word. None of the words in the pattern were matched.
The Show( a, b, c, d ) expression is a good first step. If it doesn’t tell you how JMP got that answer, try inserting Log() as follows:
word = Pat Repeat( Pat Not Any( " " ) );
"the quick brown fox",
Show( a, b, c, d );
word = Pat Repeat( Pat Not Any( " " ) );
gap = Pat Repeat( Pat Any( " " ), 1, 999, GREEDY );
Show( a, b, c, d );