inc1, inc2, inc3는 include 하지만 ex1,ex2,ex3은 exclude 하는 것을 찾는 케이스이다.
^(?=.*(?:inc1|inc2|inc3))(?!.*(?:ex1|ex2|ex3)).*$
결과는 아래와 같다.
https://stackoverflow.com/questions/5313896/help-with-regex-include-and-exclude
Help with regex include and exclude
I would like some help with regex. I'm trying to create an expression that will include certain strings and exclude certain strings. For example: I would like to include any URL containing mobil...
stackoverflow.com
'What I Do > 자주 찾는 내용' 카테고리의 다른 글
rsa key를 사용할때 마다 계속 비번을 물어보는 것 없애기 (0) | 2022.11.07 |
---|---|
vscode 에서 서버 접속할 때 마다 Enter password for .. 이런다. (0) | 2022.11.07 |
ubuntu (linux) 폴더별 용량 확인하기 (0) | 2022.11.07 |
.DS_Store ._.DS_Store 파일 생성 안되게 하기 (Samba) (0) | 2022.10.28 |
Ubuntu 설치후 SSH 셋팅 (설정) (0) | 2022.10.24 |