How do I join regex conditions together?

"((?<!\d.)((?<!At the end of this module, students will be able to:)|
(?<!Upon successful completion of this module, the students will be able to:)|
(?<!On successful completion of this module, the students will be able to:))(\d.\D*)+(?=Topics))|

((?<!\d.)((?<=At the end of this module, students will be able to:)|
(?<=Upon successful completion of this module, the students will be able to:)|
(?<=On successful completion of this module, the students will be able to:))\D*(?=Topics))"

Lets say I have all this conditions, how do i make it such that it reads through all this conditions>? I have been trying many times and it either reads only the top 3 lines alone or if i put the bottom 3 lines above instead it will only read that. It only reads the top 3 lines and not the bottom 3 lines, how do I make it such that the bot 3lines is being read as the condition as well?

@Jovian_Low Can you please provide the input data and the expected result.

@Madhavi I just need the above regex to be read together, the regex is working but I just need all 6lines to be run together and not just 3lines of the regex. Thanks :smile:

Hi @Jovian_Low

I am not sure if I understand correctly, but you could put your entire Regex on one line. This should work.

Alternatively, if you’ve already tested that the first three lines “work”, then I could suggest trying it without the return between the first and the last three lines, like that:

"((?<!\d.)((?<!At the end of this module, students will be able to:)|
(?<!Upon successful completion of this module, the students will be able to:)|
(?<!On successful completion of this module, the students will be able to:))(\d.\D*)+(?=Topics))|
((?<!\d.)((?<=At the end of this module, students will be able to:)|
(?<=Upon successful completion of this module, the students will be able to:)|
(?<=On successful completion of this module, the students will be able to:))\D*(?=Topics))"
1 Like

hi @loginerror I did joined it before many times and it only runs the first 3 lines… is there any other way to write this same regex that matches all 6conditions instead of just 3 cos I think its stucked at reading the first 3 only.

Could you provide a sample xaml file? It would help :slight_smile:

Hi @Jovian_Low,
my understanding is that you have 6 combination of values and when either or all of these matches are there in the string content, the matching result should be retrieved. At this point, you are seeing only 3 results even though there are all 6 values. Please correct me if my understanding is wrong.

however, to check the regex you have written or correct it to get the required output, i need the input data that you are passing and the expected result for the same input data.
If you could provide me both, i can try to resolve the issue at my best.

Thank you

@Madhavi hey your understand is correct, its okay I figured out the error already :slight_smile: