질문과 답변

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

2023.09.27 00:59

파풍초 조회:188

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

 

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 - -
97918 하드웨어| H110M-DGS R3.0 보드 바이오스 진입 불가 읍민Kaine 168 09-30
97917 하드웨어| LG 노트북 롬 바이오스 복구 가능한가요? [5] bulpae 474 09-29
97916 하드웨어| pc에서 tmp기능 [2] vegabond 317 09-29
97915 기 타| 토탈커맨더에서 검색이 원하는 파일이 있는 폴더를 압축 또... [3] 열심히하자 179 09-29
97914 소프트웨어| 레인미터 수정을 하려고 합니다 [2] 오두막과시 181 09-29
97913 기 타| 노트북에 ssd 2t 두개를 장착하고 윈레이드로 raid0로 묶고... [2] 천하 226 09-29
97912 윈 도 우| arm 윈도우10/11 튜닝 버젼 한글화된게있을까요? [1] MSTSC 131 09-29
97911 윈 도 우| arm 갤럭시 북을 선물받았습니다 근데 크롬 flex os 설치가... [2] MSTSC 197 09-29
97910 윈 도 우| 계정 이름 변경 문의합니다 [1] 화랑이 135 09-29
97909 소프트웨어| 레인미터 Network에 IP주소 안나오는 문제 (사진 및 파일 ... [1] 아킬레스님 125 09-29
97908 소프트웨어| mp3 to mr 로 변환할 수 있는 프로그램(유틸리티)이 있나요. [2] 덕산선생 236 09-29
97907 윈 도 우| 안녕하세요 pe구합니다 [2] 넥스트타인 390 09-29
97906 소프트웨어| 엑셀 수식 질문입니다. [2] 파풍초 266 09-28
97905 소프트웨어| 레인미터 스킨 (드라이브) 어디서 다운받을수 있을까요? (... [2] 아킬레스님 304 09-28
97904 소프트웨어| 한글화 가능하신분 [4] 淸樂 554 09-28
97903 하드웨어| 바탕화면 [1] 수담 440 09-28
97902 하드웨어| Amd 5625u 노트북 램 증설시 [8] 한스 289 09-27
97901 윈 도 우| ARM 윈도우는 USB 부팅이 안되나요? [2] MSTSC 416 09-27
97900 윈 도 우| 윈도우10 / 11 기본 메모리 점유율 차이가 있나요 [5] MSTSC 565 09-27
97899 소프트웨어| 정규식에서 제목을 헤드라인 형식으로 바꾸는 질문입니다. [10] 파풍초 161 09-27
XE1.11.6 Layout1.4.8