P
perchance
Here's the sort of text I'm looking at that's driving me nuts.
####
JOE: Hello, Jane.
How are you?
Has it been a good day?
JANE: Hey, Joe.
It's been good for me.
JOE: Great.
####
I'd like to parse the transcripts into an ordered hash that would have
[speaker => name,
statement => concatenation of multiple lines of text spoken by that
person
order => For instance, Joe's first statement is 1, Jane's 2, et
cetera.
]
I've tried stepping through the text file with a foreach $line, or as
a total string, with split()'s and regexes built around /[A-Z]+:/ but
I can't get it line up. I fear the regex is beyond me. Can anyone
help?
Thanks.
####
JOE: Hello, Jane.
How are you?
Has it been a good day?
JANE: Hey, Joe.
It's been good for me.
JOE: Great.
####
I'd like to parse the transcripts into an ordered hash that would have
[speaker => name,
statement => concatenation of multiple lines of text spoken by that
person
order => For instance, Joe's first statement is 1, Jane's 2, et
cetera.
]
I've tried stepping through the text file with a foreach $line, or as
a total string, with split()'s and regexes built around /[A-Z]+:/ but
I can't get it line up. I fear the regex is beyond me. Can anyone
help?
Thanks.