Hello community!
I am trying to extract data from a email.
I use the HTML to TEXT conversion
The text is like this:
Some non relevant start info (dynamic in length)
Serial number: 180806168
Version: DF900 1.2.2
Modifications: 1 (0x0001)
Action: Modification
Some non relevant end text bla bla (dynamic as well)
I use the following COMPOSE to extract the data
For example serial number. This works ok!
trim(
substring(
body('Html_to_text'),
add(
indexOf(
body('Html_to_text'),
'Serial Number: '
),
14),
sub(
indexOf(
body('Html_to_text'),
'Version: '),
add(
indexOf(
body('Html_to_text'),
'Serial Number: '
),
14)
)
)
)
This will work for all but the last entry called ACTION:
I cannot count the characters because
- ACTION could be dynamic (but will be always 1 word, like REBOOT or SHUTDOWN)
- There is always non relevant text in the end.
Breaking my head over this, the only thing I can come up with is find the text until the next space or CRLF..
Or is it possible to declare the rest of the text without knowing what it will be....
Kind regards,
John


Report
All responses (
Answers (