Getting Text with NewLine
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
04-01-23 03:08 PM
i have a text like this
The length of the extractet text can variate. My Idea was to do this with the Mid Function like this
I can solve the problem with
I mean, i can spilt the text with NewLine() in a collection, but there must be an easier way..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
04-01-23 03:30 PM
Try using Extract Text Field action from Utility Strings and give inputs pretext and post text.
For your question pretext would be Messobjekt: and post text would be Datum
Thanks,
Soumya
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
04-01-23 04:01 PM
Hi, @NiklasFranke please check this thread String Manipulation-Fetch data in between the string | Blue Prism Product the question is identical to yours. If you are familiar with regex multiple answers available there achieving it.
I also provided an answer there that does not use regex and work with basic actions in BP.
Hope this is helpful.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
04-01-23 04:30 PM
Yes, its costumed action
I have attached Extract Field Action Page which you can add in Utility String VBO and use according to your requirement
Hope this helps,
Thanks,
Soumya
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
04-01-23 05:47 PM
This is very similar to String Manipulation-Fetch data in between the string | Blue Prism Product. You could use the same instructions I provided for that answer with the following Regex pattern:
Messobjekt:\s(?<Messobjekt>.*)[\r\n]+Datum:\s(?<Datum>.*)[\r\n]+QS-Nummer:\s(?<QSNummer>.*)[\r\n]+Seriennummer:\s(?<Seriennummer>.*)[\r\n]*
You would end up with an output collection like:
RBC
Toronto, Ontario
Canada
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
05-01-23 11:36 AM
@MichealCharron sadly, im dont have "Extract Regex All Matches" but i have "Extract Regex Values" what should also work.
I tryed it like this:
But i had to add the Field "Name" and "Value" to the collection to made it work and now i just get this...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
05-01-23 12:03 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
05-01-23 01:14 PM
unbelievable but i tried ChatGPT and it solved my Regex Problem.. has to be "Messobjekt:\s(?<ExpectedText>[^\r\n]*)"
Anyway thank you very much for the help.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
05-01-23 01:16 PM
For the "Extract Regex Values" action, you need to specify the names of the capture groups. In the Regex pattern the name of the capture group is denoted by ?<capture group name>. In the case of the Regex pattern I specified above, the "Named Values" input collection should look like:
The only problem with the "Extract Regex Values" action is that it is very cumbersome to retrieve the individual values from the output collection because they are on separate rows:
Blue Prism's newer "Utility - Strings" VBO, with the "Extract Regex All Matches" action, can be downloaded from their Digital Exchange site at:
Utility - Strings : Blue Prism Digital Exchange
RBC
Toronto, Ontario
Canada
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
05-01-23 02:38 PM
somehow my IT was really fast and added the new VBO..Thought that would take 1-2 weeks. I got it right with "Messobjekt:\s(?<Messobjekt>.*)[\r\n]+Datum:\s(?<Datum>.*)[\r\n]+QS-Nummer:\s(?<QSNummer>.*)[\r\n]+Seriennummer:\s(?<Seriennummer>.*)[\r\n]"
But it would not work at first because the "-" in "QS-Nummer" seemed to be another type of line.. unbeliveable.. solved it trough copying the word into the Regex.
Thanks a lot, the extraction with they new VBO is way easyier like you said.
