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

Java - Error: no suitable method found for add(int, java.lang.String) -

java - JPA TypedQuery: Parameter value element did not match expected type -

c++ - static template member variable has internal linkage but is not defined -