Java Regex Metacharacters -
i found this thread , 1 of users on posted following line of code:
string[] digits2 = number.split("(?<=.)"); i have consulted couple of sources- 1 , 2-to decipher code mean can't figure out. can explain argument in split() method means?
edit: has same question had, here's helpful link
this positive lookbehind. overall expression means "after character, without capturing anything". essentially, if string looks like
abc then matches occur @ |, between characters.
a|b|c|
Comments
Post a Comment