Quote:
String is like wise if suppose I Write "Youth Baby Young Adult", I want to split string in this manner.
Youth
Baby
Young Adult
This is a pretty complex task. In its simplest form you have to build a parser for the following grammar:
statments := statement [' ' statement ]
statement := [ adjective ] noun
and a lexer able to produce the token
noun
for the identifiers
'Youth', 'Baby', 'Adult'
and the token
adjective
for the identifier
'Young'
.