Search Results

Search found 1 results on 1 pages for 'user1383058'.

Page 1/1 | 1 

  • Simple regex split

    - by user1383058
    I have the following string: string = "Peter Pan, Pete Sampras; Little Pete" And I need to split it up by name: split_string = ["Peter Pan", "Pete Sampras", "Little Pete"] I am trying to use re.findall but am having a bit of trouble with it: print re.findall(r'[,;]', string) [";", ";", ";"] What am I doing wrong here and how would I properly use re.findall here or an equivalent to split up the string?

    Read the article

1