regex - Regular expression to avoid exceeding character repeatance on a string -
i have alphabet {a,b} , want give regular look satisfies set of strings l in symbol a
appears @ twice
this have:
(b*|a)b*(b*|a|ε) ε empty string
am right or missing?
i'd simplify following:
b* (a|ε) b* (a|ε) b*
in pcre notation be:
^b*a?b*a?b*$
on side note, think kind of questions belongs more cs.se.
regex
No comments:
Post a Comment