Find one of two possible strings with RegEx

Issue

This Content is from Stack Overflow. Question asked by DerThronprinz

I have the following two string examples:

Pedestrian Zone: Yes<br>

Or

Pedestrian Zone: No<br>

I want to extract the Yes or No string but I can’t get it to work with regex.

So far I’ve managed to get the following to work:

(?<=PedestrianZone: ).{3}

But this would also extract the < in case of no.
I would like to have an or-function included in the regex.



Solution

This question is not yet answered, be the first one who answer using the comment. Later the confirmed answer will be published as the solution.

This Question and Answer are collected from stackoverflow and tested by JTuto community, is licensed under the terms of CC BY-SA 2.5. - CC BY-SA 3.0. - CC BY-SA 4.0.

people found this article helpful. What about you?