I hava a string(A list of author names for a book) which is of the following format:
author_name1
, author_name2
, author_name3
and author_name4
How can I parse the string so that I get the list of author names as an array of String
. (The delimiters in this case are ,
and the word and
. I'm not sure how I can split the string based on these delimiters (since the delimiter here is a word and not a single character).