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

Popular posts from this blog

.htaccess - First slash is removed after domain when entering a webpage in the browser -

Automatically create pages in phpfox -

c# - Farseer ContactListener is not working -