I want to accept only those strings having the pattern \'wild.flower\', \'pink.flower\',...i.e any word preceding \'.flower\', but the word should not contain dot. For example,
Here is the regex for you. ^([^\.]*)\.flower$. Example: https://regex101.com/r/cSL445/1.
^([^\.]*)\.flower$