Question
How to extract content from table using Ruta Script
Hi Folks,
Can you please help in extracting content from table using Ruta script.
I need to extract content from incoming email. I have used Ruta script to do pattern matching and extract the First Content, Second Content and ID Number.
First Content: 011-004 87-342-4260
Second Content: 011-004 44-234-8966
ID Number: 4567-34567
For example, to extract Second Content the below script is written which executes correctly as required. However, I am stuck when the same details are received in table format.
First Content: |
011-004 87-342-4260 |
Second Content: |
011-004 44-234-8966 |
ID Number: |
4567-34567 |
Document{-> RETAINTYPE (SPACE)};
W{REGEXP("(?i)(second)")}
SPACE
W{REGEXP("(?i)(content)")}
COLON
(SPACE)*
NUM{REGEXP("...")}
"-"
NUM{REGEXP("...")}
SPACE
NUM{REGEXP("..")}
"-"
NUM{REGEXP("...")}
"-"
NUM{REGEXP("....") -> MARK(EntityType,6,14)};