What about
{ '{|' . '|-' . '|}' . '{{' . '}}' . '[[' . ']]' . '__' . '==' . '::' . '**' . '##' . '''' } anySatisfy: [:pattern | self match: pattern]
?
Maybe also this one if the identity of the matching pattern is of interest:
{ '{|' . '|-' . '|}' . '{{' . '}}' . '[[' . ']]' . '__' . '==' . '::' . '**' . '##' . '''' }
detect: [:pattern | self match: pattern]
ifFound: [:pattern | self inform: 'Matched pattern: ' , pattern]
ifNone: [self inform: 'no match']
Best,
Christoph
PS: Don't use #| unless you explicitly want every method to be invoked always. Use #or:... instead, this is faster.
((self match:'{|') |
(self match:'|-') |
(self match:'|}') |
(self match:'{{') |
(self match:'}}') |
(self match:'[[') |
(self match:']]') |
(self match:'__') |
(self match:'==') |
(self match:'::') |
(self match:'**') |
(self match:'##') |
(self match:'''') )
self matchAny: { '{|' . '|-' . '|}' . '{{' . '}}' . '[[' . ']]' . '__' . '==' . '::' . '**' . '##' . '''' }