Talk:Multisplit: Difference between revisions

(→‎Correct result: Order is important)
Line 31:
 
:It shouldn't match all possible separators. It should match them in the order that they are given. With that example, the first "==" in "a!===b" is matched and removed from later matching because "==" is the separator that it checks for first. If you change the order of the separators to "!=", "==", "=" then it will match like this: a <!=> <==> b <=> <!=> c. If you change the order to "=", "!=", "==" then it will match like this: a! <=> <=> <=> b <=> ! <=> c. --[[User:Mwn3d|Mwn3d]] 15:27, 21 April 2011 (UTC)
 
Vincent> Program does exactly what you describe, except your mistake: spearators doesn't reused once they are finished, so for “a!===b=!=c” ("!=", "==", "=") it produces “a <!=> <==> b <=> !=c” - note that '!=' separator doesn't used AGAIN.
 
==Small inaccuracy in the smaller non-RE Python version?==
19

edits