질문과 답변

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

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 - -
98142 윈 도 우| 게임전용 윈도우11 참어렵네요 멋진분이 있을까요? [1] 왕캔디 535 10-25
98141 소프트웨어| 무월 님 질문드립니다 [2] 넥스트타인 373 10-25
98140 윈 도 우| KB5030509 이 업데이트 구성요소 단독 파일로만 어디서 받... [3] 마르코 368 10-24
98139 모 바 일| 배터리 탈착되는 가장 최근 모델은 뭐가 있나요? [4] 닷군 369 10-24
98138 기 타| ChipGenius 안전한가요? [1] 달그림 151 10-24
98137 하드웨어| 마우스가 바닥재질에 따라 버벅거림 현상이 있나요 [3] ccnet 329 10-24
98136 하드웨어| USB 불량섹터를 수리하는 프로그램을 추천 해주세요, [2] 좋은데이 536 10-24
98135 윈 도 우| 메모리를 추가로 달았는데..용량이 이상합니다. [11] ㅁㅣㄹㅐ 578 10-24
98134 소프트웨어| WinosInfo 한글화가 가능할까요... [14] sunshine 451 10-24
98133 윈 도 우| PE에 크롬 확장프로그램 설정.... [6] 사랑해요™ 315 10-24
98132 소프트웨어| 윈도우10 크롬 시크릿탭을 작업표시줄에 고정하는 방법? [2] 실시간 133 10-24
98131 윈 도 우| KJ CHUMPE 공유 해주실분 계실까요? [3] 아입비 542 10-24
98130 기 타| 문의 [1] 날개잃은통딹 676 10-23
98129 하드웨어| 헤드폰으로 고품질 음악 감상을 하고 싶습니다. [9] billy 541 10-23
98128 윈 도 우| 크롬으로 유튜브 [6] 덥다 479 10-23
98127 윈 도 우| 윈도우11 최신 업데이트 후, 무한정 다시 시작 알림 [2] 철이코알라 636 10-23
98126 소프트웨어| OCR 프로그램에서 산스크리트어 영어음역을 읽는 방법 질문... 파풍초 143 10-23
98125 윈 도 우| 일본판 윈도우 10/11 마소 준정버전말고... [1] 도파니 350 10-23
98124 소프트웨어| mp3를 자르는 프로그램을 찾습니다 [8] brucex 522 10-23
98123 윈 도 우| 윈도우10 시작메뉴 크롬 아이콘 사라짐 [1] comnews 299 10-23
XE1.11.6 Layout1.4.8