如何用正则匹配<input id="DATA" name="ceshi" class="abc">中class中的abc

除了正则还有什么好的办法匹配出呢

慕田峪1134683
浏览 1748回答 3
3回答

Hing

私以为正则才是最好的办法。或者你可以把abc拆成数组挨个匹配abc ,或者用indexOf()来做检测是不是abc = =(这种不靠谱),或者用substring()拆出来匹配,感觉都没有正则好用

慕的地8582982

DQDOVCGJIUKXJMWDHULTTXKJQNJUIPFVCDHXNNOQNQXAOEURNNMWWQWQFGQZJJWOFNHMXKAQWGCTTTIJNMNACUSJQZFJXNVCHOBLXUDUYXAQRINIWSCMBOXROBBNQLUUUWHVORQUCLGSSWGSUVLVPZTWWKUDHCGQTQZCWLHIIJMVWJZGWNRNXOXLEPMMJMZJJNRHRXZFILGGDWPDXMSETQNAHDHDYXQDGANGCTMSQAJTTHKUTQXQZSQRIBKUDOKTGQQGFFOVDPDGDJGMBPIMJISSIIBRHDFBDJMWZWJPJCSVXXAVVYFFUDBNYCCVTMGXWNILUEELYYXWKTAWZFFISSOILUIIYHRFJNPCVXQHAFFVRROYSZWTQVFLPISMYVUBETJXUZWWFPCMWPYIEORSVVOLLAAAKQEXWGSUTGBZWCCCCDPAQKDTXAHKBIUOORSLEIVZWMFLXHENXKYOEELVORRDKVAOEOHKNMMGPUIYIDGTMFCTILVMCTFSZTUQNQPZMSQYYKWJMGQMKADIDTDHBKOKKXQKPFOWRGWPJMBRRXQYUUTWTIYKNNXKDWKDVHNBHHXWZRORVORBLYLQAEAWVVUCCGFTTHHOWHLVZYCVBNGGGGGPAXNEHQUXXSSRYVOKGQGMMIELIQMTTNIHERXBZFSCBIIOBELNJCMMFIBAUFFREOIPWCCMVAWQYRFGMPDNEANHYSRZMUUFDCCQWDATGCWMOEUCSIHXBIEUNUNQQWWZUGXQTTGJLQQLBBBVFVIJAHASRPQQXKTMGJFYBHBRUJQBKZCYSMDNZKJMYEEUKBZOKNMYCCMCJZQQABDWWQKBEXEVJVVFFWTSOMJJYYRSMDULOLRAJTVYUDSUKEAHGXOVIRWX

hua01234567899

不想写正则就使用html解析器简单明了
打开App,查看更多内容
随时随地看视频慕课网APP