String matching: Difference between revisions

Line 3,451:
 
=={{header|Picat}}==
The two most common predicate to use for string matching is <code>find/4</code> (find a substring) or <code>append/3</code> (a general purpose reversible predicate for concatenating/splitting lists/strings). Both predicates are non-deterministic and can yield multiple solutions, e.g. together with <code>findall/2</code>.
 
<lang Picat>import util.
Line 3,518:
positions = [[9,16],[21,28]]
positions = [[5,5],[8,8],[10,10],[17,17],[20,20],[22,22]]</pre>
 
 
=={{header|PicoLisp}}==
495

edits