Read text file and store your string in a String Variable —> Text
Use Matches activity and set pattern as (?>address: )\w* —> so it’ll take text after every address: (with address:)
Output Variable—> Address
Assign to get 2nd occurrence
str1 (String) = ((Address(1).toString).split({“:”},StringSplitOptions.None)(1)).trim Address(1) —> to get 2nd occurrence from collection (Address) .split({“:”},StringSplitOptions.None)(1) —> to split with “:” and get text after “:”
I’m attaching my sample workflow for your understanding : RegexOccurence.zip (11.1 KB)