Parsing -- Split of a string?
Posted on 2003-02-20
3 inquiries -- same category:
What if I wanted do a similar split as you mention Ozo, however I want everything between K & NOT L(~L)
or M & NOT Z or V & NOT B
AFDFSDFKLSDFSDFKVDFDSFSDFMZSDFDFSMRDFSDFMY gives the following splits:
Also, a quick question. If I have a string with each line having a return(newline) at the end:
and I just want to separate the 1st newline. Thus, the goal - 2 strings:
what is the best way to do it.. Is this correct:
($first, $last) = (/\n/, $string)
Also, if I just want to parse on the basis of 'K' but keep the 'K' would it be
@words = split(/?<=K/, $string)?
Thanks so much for your help.