I need to check if the string provided by the user starts with abc and ends with de with 4 characters in between like
"abc<4 characters>de".
I tried using pattern ("^abc.*(4)de$")
But it fails for the 4 characters in middle. Is there any problem with pattern.