질문과 답변

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

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 - -
98024 윈 도 우| KMSTools 인증이 안되는데 해결방법이 있을까요? [10] 장고다발총 1310 10-14
98023 윈 도 우| 윈도우11에서 expressvpn 이용시 끊김 질문드려요. [5] hwan 110 10-14
98022 기 타| 파일 이름 일괄 변경 - DarkNamer 이거 [4] nissan 421 10-13
98021 윈 도 우| 갑자기, 제어판이 안들어 가집니다. [6] 기억의저편 424 10-13
98020 소프트웨어| 네노버 아이디어패드에 설치한 한글 22 메뉴가 깨지는데 어... [1] 좋은데이 140 10-13
98019 하드웨어| oki 컬러프린터 용지함문의 [1] First. 173 10-13
98018 윈 도 우| ImageX_x64.exe 윈도우 10 최신본 구할 수 있을까요? [2] 배움의길로 451 10-13
98017 기 타| 구형 테블릿 pc 공장초기화 하는방법좀 알려주세요, [2] 까투리 415 10-13
98016 윈 도 우| 원격으로 윈도우즈 설치 [1] 바다산해 630 10-12
98015 윈 도 우| 노트북에 윈도우10 설치 방법에 대해서 문의 합니다, [3] 좋은데이 353 10-12
98014 윈 도 우| 이더넷 끄기 후 특정 프로그램 실행하는 배치파일 이나 vba... [14] 덤더미 342 10-12
98013 모 바 일| 빅스비에 특정 명령어를 폰흔들기로 실행 시킬 수 있나요? brucex 114 10-12
98012 윈 도 우| Win11 22H2 누적 업데이트 22621.2428 바탕화면 아이콘 글자 [2] 오두막과시 564 10-12
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
XE1.11.6 Layout1.4.8