I have a requirement where I need to find the consecutive alphabetical characters in the string in Oracle SQL. I have tried regular expressions but it is not working.
Table Name - Test_Dummy(var_col)
Values in Var_Col
Test
Test1
Tesssst
TTTTest
ABCDTest
Select * from test_dummy where regexp_like(var_col, '[A-Za-z]{5,}');
The output I am getting is all the strings with more than 5 characters.
I used below regexp to get the repeated characters -
Select * from test_dummy where regexp_like(var_col,'(.+1)\1{3,}?');
Result :
TTTTest
Tesssst
I need to find consecutive data i.e. ABCDTest