질문과 답변

소프트웨어 정규표현식 질문입니다. 도움을 부탁드립니다. ^.^

2023.09.27 00:59

파풍초 조회:187

정규표현식 질문입니다. 도움을 부탁드립니다. ^.^

 

1,2번 중에서 1번의 정규식은 다음과 같습니다. 그런데 2는 중간에 "."가 있는 경우에는 정규식에서 제외하고 싶습니다. 이런 경우에는 어떻게 정규식을 해야 할 지 고수님의 한 수 지도를 부탁드립니다.

해피데이!

 

1. 한 문장 안에 "—"가 2개가 있는 경우에는 "—"albeit through different ways from those of science fiction"—"에 있어서  {albeit through different ways from those of science fiction}로 바꾸고 싶습니다.

 

1. The end of Griffin actually begins with his body decomposing, which leads to a progressive alteration in his state of consciousness and then to madness, ending finally with his death at the hands of a mob. The level of madness attained by Griffin calls to mind—albeit through different ways from those of science fiction—the particular fragmentation of the self of the person with schizophrenia.

 

찾기: ([a-z])—(.*?)—([a-z])

바꾸기: $1 {$2} $3

 

1. The end of Griffin actually begins with his body decomposing, which leads to a progressive alteration in his state of consciousness and then to madness, ending finally with his death at the hands of a mob. The level of madness attained by Griffin calls to mind {albeit through different ways from those of science fiction} the particular fragmentation of the self of the person with schizophrenia.

 

2. 한 문장 안에 "—"가 한 개만 있는 경우. "." 마침표를 기준으로 양쪽에 각각 한 문장 안에 "—"가 한개씩 있습니다. 이럴 경우에는 정규식을 적용할 필요가 없습니다.

2. The end of Griffin actually begins with his body decomposing, which leads to a progressive alteration in his state of consciousness and then to madness—ending finally with his death at the hands of a mob. The level of madness attained by Griffin calls to mind—albeit through different ways from those of science fiction the particular fragmentation of the self of the person with schizophrenia.

 

 

번호 제목 글쓴이 조회 등록일
[공지] 질문과 답변 게시판 이용간 유의사항 gooddew - -
98011 기 타| 배치파일 명령어 질문 입니다 [2] 스누스 215 10-12
98010 윈 도 우| esd 파일 [2] 도파니 443 10-12
98009 윈 도 우| flushdns 이거 배치파일로 어떻게 만드나요? [2] 소소생 230 10-12
98008 윈 도 우| 윈도우에서 본인여부확인시 내모바일 앱에서 받을려면 어떻... [3] brucex 275 10-11
98007 윈 도 우| 윈도우2000 문제 입니다 [14] 조갱 567 10-11
98006 기 타| 이런 문제의 원인인 무엇인가요? (윈도우 부팅 관련) [8] joyleehk 558 10-11
98005 소프트웨어| chrome 현재 tab url 얻는 autohotkey script [12] Abundance 218 10-11
98004 윈 도 우| 윈11 22621.2134 사용중인데 오늘 출시된 2428버전 [2] 새대갈 872 10-11
98003 하드웨어| 오디오 스플리터 관련입니다. [5] 퐁이 336 10-11
98002 기 타| 안녕하십니까 크롬확장인데 [6] nissan 394 10-11
98001 소프트웨어| 윈도우 폴더 비번 프로그램 문의 [3] 뷰티블마인 501 10-10
98000 윈 도 우| WINPE PowerShell 지원 되는 버전 있나요? [1] 열려라참기 197 10-10
97999 소프트웨어| 포토샾 생성형 채우기 에러 문의 드립니다. [2] 구리시 452 10-09
97998 윈 도 우| 이상한 질문 [2] 어차피 634 10-09
97997 기 타| 클라우드 서비스 [6] 도파니 504 10-09
97996 소프트웨어| PE_VHD_Boot+Once_R_click_F+wim최적화+wim합치기5.bat 공... [4] 홍은동초짜 2188 10-09
97995 하드웨어| 공유기 추천... [15] 최동안 1015 10-09
97994 하드웨어| 외장하드 상태 확인 좀 부탁드립니다. [11] 깐지 669 10-09
97993 소프트웨어| 프로그램 아이콘 변경방법 스피커 244 10-08
97992 소프트웨어| emeditor 정규표현식에서 대소문자를 첫글자만 대문자로 바... [2] 파풍초 167 10-08
XE1.11.6 Layout1.4.8