1
나는 문자열에서 텍스트의이 조각이 :제거 캐리지 리턴
이<p class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: center; line-height: normal;" align="center"><i style=""><span style="" lang="ES-TRAD">some text
another text<o:p></o:p></span></i></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: center; line-height: normal;" align="center"><i style=""><span style="" lang="ES-TRAD">some text more
and some text more<o:p></o:p></span></i></p>
내가
string.replace(/[\r\n]/g, "");
모든 캐리지 리턴이 제거 될 경우에, 난 그냥 원하는을 "일부 텍스트"와 "다른 텍스트"사이에있는 사람들을 제거하십시오.
미리 감사드립니다.
[정규식을 사용하여 HTML을 구문 분석 할 수 없음] 알고 계십니까? (http://stackoverflow.com/questions/1732348/regex-match-open-tags-except-xhtml-self-contained-tags/ 1732454 # 1732454), 맞습니까? –
하지만, 불규칙한 표현으로 HTML을 파싱 할 수 있습니다! –
@ Daniel Pryden : 아니요,하지만 어쨌든 고마워요. – santiagokci