Quantcast
Channel: Search Results For: domain:blog.pengyifan.com
Viewing all articles
Browse latest Browse all 27

Split a string into pairs of words

$
0
0

Given a string such as “aa bb cc dd ee ff“, is there a regex that works with String.split() to extract two words at a time? The expected result is: [aa bb, cc dd, ee ff]


Viewing all articles
Browse latest Browse all 27

Trending Articles