I'm trying to write a code using regex and my text file. My file contains these words line by line:
each
expressions
flags
in
from
given
line
of
once
lines
no
My purpose is; displaying the words that created by removing letters from given substring.
For example; if my substring is "flamingoes"
, my output should be;
flags
in
line
lines
no
Because they are created from my substring by removing letters, and they are in my text file also.
I did many works about regex but I am interested about this challenge. Is there any regex solution for this?