RegEx getting multiple values out of Text Parser

I’m a bit novice at this and I’m trying to get a few values out of the text parser.

I have this example where I’m getting close but I can’t make it work, and I’m not sure if this in the cleanest way?

(?<date>(?<=Date:\* ).+?(?=\n))|(?<duration>(?<=Duration:\* ).+?(?= s\n))|(?<CallerID>(?<=1: \").+?(?=\" <))|(?<Caller>(?<=<).+?(?=>\n2))|(?<Dialed>(?<=2: ).+?(?=\n))|(?<Confidence>(?<=Confidence:\* ).+?(?=\n))|(?<Trans>(?<=TimeDurationSpeakerPhrase\n)((.|\n)*)\n\*DISC)|

When asking your question, please include:

:footprints: The steps you have taken
:camera_flash: Relevant screenshots
:link: Any links you have
[ Code { "and": "JSON", "in" : "code block"} ]
:x: Exclude Personal Information.

@Nate Make it’s Text parser needs every output section to be grouped. If you don’t group it, it will not output it.
It would looke like the following (only did the first 2 parts):

(?<date>(?<=Date:\* )(.+?)(?=\n))|(?<duration>(?<=Duration:\* )(.+?)(?= s\n))

Hope this helps you out! :smiley:

Let us know if you need any additional assistance!


Thanks that helped!! I also needed to remove my trailing |

Another question, within this, if I want to remove “/n* s 1”, “/n* s 2” from the transcription and replace it with “Speaker1:”,“Speaker2:”, how would I go about that?

So I went to implement this but I’m having some issues

my output looks to be the same as yours but when it goes to the second node the values seemed to be null

Does it has something to do with getting the bundles into an array?
If so I’m not sure how to make that happen.

Yes @Nate , because right now you get every output into a bundle it would have “null” for something in bundle 2.
Use an array aggregator after the text parser to put everything into 1 array and use it from there.

1 Like

@Bjorn.drivn, I tried that, but I still get them in bundles:

@Nate , no you get 1 bundle with an array which contains all items :wink:

1 Like

@Bjorn.drivn I’m still missing something because this is what the next node looks like:

Yes, now you can use the map() and get() functions to grab your data.

1 Like

nevermind i think i got it

Heya @Nate awesome to hear that you found a way to achieve this :muscle:

Would you mind sharing your solution with the community so that someone can potentially learn from you in the future?

Thanks a lot :pray:

I was able to get the data out of an array like such {{get(map(20.array; “tag”); 3)}}