Click here to Skip to main content
15,445,757 members
Home / Discussions / Regular Expressions
   

Regular Expressions

 
QuestionUse content of a database field in RegEx Pin
John Bradford 202227-Jan-22 7:31
MemberJohn Bradford 202227-Jan-22 7:31 
AnswerRe: Matching a unknown range of lines Pin
Pete O'Hanlon18-Jan-22 22:37
mvaPete O'Hanlon18-Jan-22 22:37 
Questionregex related query Pin
Member 154859391-Jan-22 8:23
MemberMember 154859391-Jan-22 8:23 
AnswerRe: regex related query Pin
Gerry Schmitz1-Jan-22 8:45
mveGerry Schmitz1-Jan-22 8:45 
QuestionFind and Replace starting... until Pin
Roland Plomp31-Dec-21 4:11
MemberRoland Plomp31-Dec-21 4:11 
QuestionHow do I make this CASE INSENSATIVE? Pin
RapidDonO23-Dec-21 1:13
MemberRapidDonO23-Dec-21 1:13 
AnswerRe: How do I make this CASE INSENSATIVE? Pin
jschell23-Dec-21 6:09
Memberjschell23-Dec-21 6:09 
QuestionHow to eliminate Pattern if Contains specific words Pin
RapidDonO20-Dec-21 5:30
MemberRapidDonO20-Dec-21 5:30 
I have an alias.txt file that looks like this

Shell
CHALET_HIST_ARCHIVE - zz** Chalet History Archive **zz
    CHALET_Practice - CHALET Retail ***Practice***
             CHALET - CHALET
         CPPractice - ***NCR Practice***
 LANDSCAPE_Practice - CHALET Landscape ***Practice***
          LANDSCAPE - CHALET LANDSCAPE
           THALMANN - Thalmann Farm
           CpSystem - CPSQL System Database



The value to the left of the dash is the alias name. I need to return all alias names that do not contain PRACTICE, ARCHIVE, RESTORE, or CPSYSTEM (regardless of case).

In the list above, the only valid values returned would be THALMANN, CHALET, and LANDSCAPE. All the others should be ignored as containing one of the above words to eliminate the result.

No white space before or after the returned value.

Currently i am at:
^\s*\w*


Which accurately includes everything left of the dash, but does not eliminate the above results containing one of the four words.

Any advise?

Dj

modified 20-Dec-21 12:16pm.

AnswerRe: How to eliminate Pattern if Contains specific words Pin
Richard Deeming3-Jan-22 23:32
mveRichard Deeming3-Jan-22 23:32 
QuestionRegular expression to extract row 3 Pin
DanVanClan17-Nov-21 2:53
MemberDanVanClan17-Nov-21 2:53 
Questionfail2ban regex matching on testing sites but not fail2ban itself Pin
murdocklawless4-Nov-21 1:07
Membermurdocklawless4-Nov-21 1:07 
AnswerRe: fail2ban regex matching on testing sites but not fail2ban itself Pin
Richard MacCutchan4-Nov-21 2:07
mveRichard MacCutchan4-Nov-21 2:07 
GeneralRe: fail2ban regex matching on testing sites but not fail2ban itself Pin
murdocklawless4-Nov-21 2:49
Membermurdocklawless4-Nov-21 2:49 
AnswerRe: fail2ban regex matching on testing sites but not fail2ban itself Pin
Peter_in_27804-Nov-21 3:17
professionalPeter_in_27804-Nov-21 3:17 
GeneralRe: fail2ban regex matching on testing sites but not fail2ban itself Pin
murdocklawless4-Nov-21 3:31
Membermurdocklawless4-Nov-21 3:31 
GeneralRe: fail2ban regex matching on testing sites but not fail2ban itself Pin
Peter_in_27804-Nov-21 12:05
professionalPeter_in_27804-Nov-21 12:05 
GeneralRe: fail2ban regex matching on testing sites but not fail2ban itself Pin
murdocklawless4-Nov-21 13:10
Membermurdocklawless4-Nov-21 13:10 
QuestionEditing my existing Regex Pin
Member 154173673-Nov-21 1:14
MemberMember 154173673-Nov-21 1:14 
Questionregex to replace accents Pin
Member 1489067816-Sep-21 3:50
MemberMember 1489067816-Sep-21 3:50 
AnswerRe: regex to replace accents Pin
Richard Deeming16-Sep-21 4:28
mveRichard Deeming16-Sep-21 4:28 
GeneralRe: regex to replace accents Pin
Richard MacCutchan16-Sep-21 4:44
mveRichard MacCutchan16-Sep-21 4:44 
GeneralRe: regex to replace accents Pin
Richard Deeming16-Sep-21 4:55
mveRichard Deeming16-Sep-21 4:55 
GeneralRe: regex to replace accents Pin
Richard MacCutchan16-Sep-21 5:05
mveRichard MacCutchan16-Sep-21 5:05 
GeneralRe: regex to replace accents Pin
Member 1489067816-Sep-21 5:38
MemberMember 1489067816-Sep-21 5:38 
GeneralRe: regex to replace accents Pin
Richard Deeming16-Sep-21 5:54
mveRichard Deeming16-Sep-21 5:54 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.