c# - Regular expressions handling -
i want write regular look can match next strings:
off on string valve
i thinking write ^(?<arrivingstring>[a-za-z]{?})$
.
now don't know write within curly brackets, value of arriving string different , random.
thanks
^(?<arrivingstring>(off|on|string|valve)).*
this matches 4 words provided:
mutiline enabled regex the words @ start of each linethis regex match every line in it's entirety provided starts of 4 strings. captured grouping arrivingstring
will contain whichever of 4 words found.
c# regex expression
No comments:
Post a Comment