Hyphens


#1

how can I scan a string and chop it of to a words without losing the
hyphens ?
EG: apple $ two ( to be
will be saved in the array
as array = [‘apple’, ‘$’ , ‘two’, ‘(’ , ‘to’ , ‘be’]
thank you


#2

how can I scan a string and chop it of to a words without losing the
hyphens ?
EG: apple $ two ( to be
will be saved in the array
as array = [‘apple’, ‘$’ , ‘two’, ‘(’ , ‘to’ , ‘be’]
thank you

split?

‘apple $ two ( to be’.split