Java repetitive pattern matching (2)
问题 Consider the following regex: (([^\|])*\|)*([^\|]*) This matches repetitive string patterns of the type ("whatever except |" |) {0 to any times} ("whatever except |" |) {1 time} So it should match the following String, which has 17 substrings (16 repeated, plus " z" as the last one). "abcd | e | fg | hijk | lmnop | | | qrs | t| uv| w |||||x y| z" Indeed, RegexPal verifies that the given regex does match the above string. Now, I want to get each of the substrings (i.e., "abcd |", "e |", "fg |"