질문과 답변

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

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 - -
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] 홍은동초짜 2187 10-09
97995 하드웨어| 공유기 추천... [15] 최동안 1015 10-09
97994 하드웨어| 외장하드 상태 확인 좀 부탁드립니다. [11] 깐지 669 10-09
97993 소프트웨어| 프로그램 아이콘 변경방법 스피커 244 10-08
97992 소프트웨어| emeditor 정규표현식에서 대소문자를 첫글자만 대문자로 바... [2] 파풍초 166 10-08
97991 윈 도 우| diskpart 관련 질문 [3] hwangsan 385 10-08
97990 윈 도 우| Context Menu에 vhd 생성메뉴 [11] 사랑해요™ 313 10-08
97989 윈 도 우| 작업표시줄 우측에 Tools>> 아이콘이 나타나게 하는 ... fkjin 240 10-08
97988 소프트웨어| 윈도우와 pe 에서 같이 사용할 수 있는 포타블앱이 있나요? [2] brucex 417 10-07
97987 하드웨어| 조금 무리한 질문 [7] 어차피 655 10-07
97986 소프트웨어| ventoy에서 윈도우11 tpm 우회설치되나요? [3] 『ⓖⓤⓝ』 600 10-07
97985 윈 도 우| 12세대 13세대 win10문의 [6] 뷰티블마인 570 10-07
XE1.11.6 Layout1.4.8