S
S
SankaSanka2019-07-17 15:29:43
Java
SankaSanka, 2019-07-17 15:29:43

Is it possible to use regular expressions to determine that a word has the same first and last letter?

I know how to do it with a simple procedure.
The question is about regular expressions.
thank)

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey Gornostaev, 2019-07-17
@SankaSanka

"abcda".matches("^(.).*\\1$")

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question