Is it possible only with using RegEx to extract palindromes in string? This is an interview question.

input:
madam#refer,##invalid% kayak%% invalid
output:
madam, refer, kayak
Thanks a lot!
Thanks for a good question, here is your answers:
https://medium.com/analytics-vidhya/coding-the-impossible-palindrome-detector-with-a-regular-expressions-cd76bc23b89b
https://stackoverflow.com/questions/233243/how-to-check-that-a-string-is-a-palindrome-using-regular-expressions

Short answer: possible but not for arbitrary length
C# devs
null reference exceptions

source