0

I have a SAS dataset with the transcription of a web chat in one row

Example here: conversation id = 346768584212 Transcript = 11:13:57 info: Thank you for choosing to chat with us. An agent will be with you shortly...11:13:58 info: You are now chatting with Harsh...11:14:00 Shahid: Hello..11:14:03 Shahid: HI Harsh..11:14:25 Shahid: I have received two customers numbers one for personal banking and one for business banking..11:14:30 Harsh

I'd like to use SAS to split this out so that there is one row per message

Example:

conversation ID

346768584212
346768584212

Message

11:13:57 info: Thank you for choosing to chat with us.

11:14:03 Shahid: HI Harsh..

Cant figure out how to split it by timestamp - any advice would be much appreciated

Thanks

Tom

Tom
  • 1
  • What's the source file like? You can use SCAN separate parts of text, PRXPARSE to use regular expressions or a customized IMPORT process that reads the file correctly from the start. – Reeza Jul 16 '17 at 00:03
  • As posted, this question does not meet SO rules. Please show what you've tried and better sample data in a clear form we can use for testing. – Reeza Jul 16 '17 at 00:04

1 Answers1

0

should be pretty easy to do. Here's a reference:

sas regular expressions

check out PRXNEXT on page 12. your regular expression would be "/\d\d:\d\d:\d\d/"

DCR
  • 14,737
  • 12
  • 52
  • 115