Regex to match a word or a dot between words (optionally) in a string
问题 I'm currently working on an issue that matches a word between special characters. Optionally matches words in between dot. I currently tried below regex pattern it works fairly well in words that have dot in between but I struggled to make it work with word without dot. [^\W\s]+\.+[^\s\W)]+ Given the string: ,DECODE(T3.ATEST,' ',T3.BATEST ,DECODE(NVL(T4.BATEST,'9') ,'1',NVL(T4.BATEST,' ') ,T3.BATEST)) it matches the following: T3.ATEST T3.BATEST T4.BATEST T4.BATEST T3.BATEST Now trying this