As a non-expert in Regex, I can try to help you. I think one way to do this is by combining all of the Regex pattern modules into one using the OR operator | and naming the groups to easily parse them afterwards.
If I remember correctly, Make will output the matches with their group name which makes it easier to get the right result afterwards.
Named capturing group: Matches “x” and stores it on the groups property of the returned matches under the name specified by <Name>. The angle brackets (< and >) are required for group name.
For example, to extract the United States area code from a phone number, we could use /\((?<area>\d\d\d)\)/. The resulting number would appear under matches.groups.area.
@Fahad_Sheji As @Callinetic said you can combine them with an OR and aggregate them at the end. Take a look at some of the other posts which explain this:
I have a scenario that does just that, using named capture groups.
Just add (?) to your group and you’ll end up having each named group as one variable – and you can have as many as needed in one single module.
If you provide a sample text I can try help you out with the Regex, but as you already have the code, it should be just a matter of adapt it (maybe marking each line start, for instance).