not able to split string using regex in groovy -


Using iam, the following code is not able to split the string using regex

 < Code> string [] splitedEmail = email.split (/ \\ n \; \, \ s /);   

is giving it the same

You probably want To wrap it in a square class, [] :

  string [] splitedEmail = email.split (/ [\ n ;, \s] /)    

Comments

Popular posts from this blog

How can I add a seperate action listener to all 14 of my buttons at once that can determine player turn?(java) -

php - Sorting an multidimension array using usort fails -

Simple file compression in C -