How do I write a regular expression to find the longest recurring character sequence in a line?
You can find all relevant character sequences with the regular expression /(.)\1*/
.
Finding the longest such sequence is best done using a tool other than regular expressions.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With