-2
나는 this question과 (과) 비슷한 질문이 있습니다. 하지만 추가 질문이 있습니다. 아래 질문에서 같은 표를 사용하여 추가 행을 두 개 추가했습니다. 세 개의 추가 라인사전에서 약어 바꾸기
와 동일한 샘플 사전을 인용A,B,C,D
RNA,lung cancer,15,biotin
RNA,lung cancer,15,biotin
RNA,breast cancer,15,biotin
RNA,breast cancer,15,biotin
RNA,lung cancer,15,biotin
65 y 4m,prostate cancer,biotin
m,lung cancer,biotin
rna,ribonucleic acid
rnd,radical neck dissection
rni,recommended nutrient intake
rnp,ribonucleoprotein
m,months
m,male
y,years
내가 예를 들어, 논리적으로 교체하고 싶은, 또는 숫자와 글자 사이에 공백이없는 m (뒤에 숫자 'y'년과 마찬가지로 'm'과 마찬가지로)는 개월이됩니다. 반면에 m 또는 단일 m이 뒤에 오는 문자는 남성이됩니다 (월의 m은 사전에서 처음 발생하기 때문에 달이 아닙니다). 최종 출력을
A,B,C,D
ribonucleic acid,lung cancer,15,biotin
ribonucleic acid,lung cancer,15,biotin
ribonucleic acid,breast cancer,15,biotin
ribonucleic acid,breast cancer,15,biotin
ribonucleic acid,lung cancer,15,biotin
65 years 4months,prostate cancer,biotin
male,lung cancer,biotin
다른 "m"(남성)과 "m"(남성)을 구별하는 것은 상당히 어렵습니다. – snotna
@snotna 나는 그것이 나쁘다는 regex를 사용하여 할 수있다. – abn