regex - How to match strings that start and end with the same character, but have an odd number of letters? -
i'm trying formulate regex identifies strings begin , end 'b" have odd number of letters overall. far have following:
strings start , end b:
^b.*b$
i not sure how accepts odd number of letter. numbers it's easy:
^b(..)*b$
but odd throwing me little
it should same:
^b.(..)*b$
Comments
Post a Comment