Match all lines except lines beginning with numbers or a few alphabets
-
Dear friends, I am new to this forum. I need your expert advise on deriving a regular expression to achieve the following. I am using Editplus' search and replace. I could use Notepad++ as well, if required. I have some files containing several thousand lines of content. I want to match lines in the content except the ones which start with a number and period (1. or 2. .......... 5000.) or the first 4 alphabets and a period (a. or b. or c. or d.). Any help is greatly appreciated. Thanks in advance. Diamond Dallas
-
Dear friends, I am new to this forum. I need your expert advise on deriving a regular expression to achieve the following. I am using Editplus' search and replace. I could use Notepad++ as well, if required. I have some files containing several thousand lines of content. I want to match lines in the content except the ones which start with a number and period (1. or 2. .......... 5000.) or the first 4 alphabets and a period (a. or b. or c. or d.). Any help is greatly appreciated. Thanks in advance. Diamond Dallas
Old post but... I think this should work (for anyone who has a similar need). You can change the 1 to 0 if you want to avoid lines that begin with "0." as well. Also note that "aa." (or similar) will be matched/returned, since the request was to specifically avoid lines that start with a SINGLE letter (a, b, c, d) followed by a period. But this is easy to adjust as necessary if multiple letters followed by a period should also be skipped/avoided. ^(?![1-9]+\.|[a-d]\.).+$