질문과 답변

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

2023.09.27 00:59

파풍초 조회:189

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

 

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 - -
97913 기 타| 노트북에 ssd 2t 두개를 장착하고 윈레이드로 raid0로 묶고... [2] 천하 226 09-29
97912 윈 도 우| arm 윈도우10/11 튜닝 버젼 한글화된게있을까요? [1] MSTSC 131 09-29
97911 윈 도 우| arm 갤럭시 북을 선물받았습니다 근데 크롬 flex os 설치가... [2] MSTSC 198 09-29
97910 윈 도 우| 계정 이름 변경 문의합니다 [1] 화랑이 135 09-29
97909 소프트웨어| 레인미터 Network에 IP주소 안나오는 문제 (사진 및 파일 ... [1] 아킬레스님 127 09-29
97908 소프트웨어| mp3 to mr 로 변환할 수 있는 프로그램(유틸리티)이 있나요. [2] 덕산선생 236 09-29
97907 윈 도 우| 안녕하세요 pe구합니다 [2] 넥스트타인 391 09-29
97906 소프트웨어| 엑셀 수식 질문입니다. [2] 파풍초 266 09-28
97905 소프트웨어| 레인미터 스킨 (드라이브) 어디서 다운받을수 있을까요? (... [2] 아킬레스님 305 09-28
97904 소프트웨어| 한글화 가능하신분 [4] 淸樂 555 09-28
97903 하드웨어| 바탕화면 [1] 수담 441 09-28
97902 하드웨어| Amd 5625u 노트북 램 증설시 [8] 한스 290 09-27
97901 윈 도 우| ARM 윈도우는 USB 부팅이 안되나요? [2] MSTSC 417 09-27
97900 윈 도 우| 윈도우10 / 11 기본 메모리 점유율 차이가 있나요 [5] MSTSC 568 09-27
97899 소프트웨어| 정규식에서 제목을 헤드라인 형식으로 바꾸는 질문입니다. [10] 파풍초 161 09-27
97898 윈 도 우| win11 22h2 KB5030310 업데이트 후 아이콘 글자 번짐 현상 [2] 오두막과시 396 09-27
97897 소프트웨어| D-Snapshot 복원 문의 [4] 유노 248 09-27
97896 윈 도 우| 네트워크 드라이브 연결 에서 시스템에 파일을 엑세스 할 ... brucex 155 09-27
97895 윈 도 우| 드라이버 백업 [2] 어차피 335 09-27
» 소프트웨어| 정규표현식 질문입니다. 도움을 부탁드립니다. ^.^ [2] 파풍초 189 09-27
XE1.11.6 Layout1.4.8