How to create a regex pattern to identify words which contain palindromes or the whole word itself is a palindrome such as “programmatic” , “malayalam”
2 Likes
@supermanPunch
You can use the following: (?<N>.)+.?(?<-N>\k<N>)+(?(N)(?!))
Keep in mind that this will match " a " or " I " so you may want to trim and filter your matches by some specified length.