길이가 2 자 이상인 모든 단어를 스팬 태그 사이의 문자열로 묶어야합니다. 모든 물음표, 구두점 등은 스팬 외부에 남겨 두어야합니다 (a-z 및 특수 문자는 ñ, á, é 등으로 만 사용해야합니다). 그래서 문자열에있는 모든 단어를 html 태그로 묶는 방법은 무엇입니까?
,이 :<a href=http://example.com/prenda>Prenda</a> <a href=http://example.com/de>de</a> <a href=http://example.com/vestir>vestir</a> <a href=http://example.com/que>que</a>
<a href=http://example.com/se>se</a> <a href=http://example.com/ajusta>ajusta</a>? A <a href=http://example.com/la>la</a>
<a href=http://example.com/cintura>cintura</a> y <a href=http://example.com/llega>llega</a>
<a href=http://example.com/generalmente>generalmente</a> <a href=http://example.com/hasta>hasta</a> <a href=http://example.com/el>el</a> <a href=http://example.com/pie>pie</a>.
어떤 아이디어 :
Prenda de vestir que se ajusta? A la cintura y llega generalmente hasta el pie.
이되어야 하는가? 감사!
는 어쩌면 그것은 (도움 http://stackoverflow.com/q/1732348/ 596781) 먼저. –
정규식을 사용하여 – kol