→ mervynW:preg_replace('=\ ?') 10/05 18:24
→ tyf99:regex 10/05 18:25
→ tyf99:prematch & postmatch 10/05 18:31
→ tnsshnews:請問要怎樣取代呢? 一取代就把中間的屬性質都變空了 10/05 22:25
推 mervynW:preg_replace('/(\w+)=\ ?(\w+)/', '\\1="\\2"') 10/05 22:39
→ tnsshnews:謝謝樓上, 好像是取出of與is,沒有取代成""? 10/05 23:13
→ tnsshnews:不知道是不是我搞錯了, regex真是難懂的東西 10/05 23:14
→ tnsshnews:$string="<wf cmd=ignore pos=IN>for</wf>" 10/05 23:15
→ tnsshnews:preg_replace('/(\w+)=\ ?(\w+)/', '\\1="\\2"',$string 10/05 23:16