In short:
Given the followoing string:
Input string -> "hello, world" , oh my, parapappa12
I want to extract these three "tokens":
Output tokens ->
- "hello, world"
- oh my
- parapappa12
Tokenizing string in ios
I got a file containing some data. It looks something like:
word , word, word
word , word, word
word , word, word
where some words can contain a "," but only when the word starts and end with a certain character, eg. starts with " and ends with "
Example of words:
word : blebla bla bla
word : "bla bla bla, bla"
How do I define a regular expression to tokenize the file based on the "," ingoring white spaces between the words and including this "special" case?
I remember using regex in Perl to achieve something similar but was long time ago and I kind of forgot the syntax and I am not sure if this is supported in Objective-C and iOS