$t='
a34de1251f0d9fe1e645927f19a896e8b6c5a531a458a2e790c1fd6421739d1c2bd00cf8d8501f1eceaeab0f995ca6dfchrome5db79b134e9f6b82c0b36e0489ee08edb90dd5946f0946207856a8a37f441edf
a34de1251f0d9fe1e645927f19a896e87071b34c2284daffb5befdf51d55425059345598b695e77a96839da1bf65b86eテスト5db79b134e9f6b82c0b36e0489ee08edb90dd5946f0946207856a8a37f441edf
$pre_reg = '/a34de1251f0d9fe1e645927f19a896e8b6c5a531a458a2e790c1fd6421739d1c.*?032d3dad5530043b593d231097a13dcc6e27b119e07db0a1fb40879b68851745クローム5db79b134e9f6b82c0b36e0489ee08edb90dd5946f0946207856a8a37f441edfb6c5a531a458a2e790c1fd6421739d1c D0%CB%B9 および chrome)
ディスカッションに返信 (解決策)
$pre_reg = '/a34de1251f0d9fe1e645927f19a896e8b6c5a531a458a2e790c1fd6421739d1c.*?b5ffc414d7a3606ac5f9f7dcb7eebb50c8510a84b69ce2418efaeab95e9c7bbf100db36a723c770d327fc0aef2ce13b193f0f5c25f18dab9d176bd4f6de5d30e19756c57eb1d405d7d6bd5c74719a3f74d7a26401476566213572dc4fb1f7f5f好きなものを管理_Baidu Tieba 6e916e0f7d1e588d4f442bf645aedb2f9ec1046dc08c1a779725e7770f00ae80< ;link id ="css_head_0" href="http://static.tieba.baidu.com/tb/static-member/style/forums.css?v=1222222" type="text/css" rel="stylesheet" />
9b01f389d55e9461e33ee0509a17c9962805cc86ec6eb02bd38bfbc1ffe28c6dvar TbConf = {'domain' : {"TB_STATIC":"http://static.tieba.baidu.com/","TB":"http://tieba .baidu.com/","PASSPORT":"http://passport.baidu.com/","MSG":"http://msg.baidu.com/","SPACE":"http:// hi.baidu.com/","UFACE":"http://tb.himg.baidu.com/","IMGSRC":"http://imgsrc.baidu.com/","ZYQ_AD":"http ://a.baidu.com/","ZYQ_SMALL_PIC":"http://imgsrc.baidu.com/forum/abpic/item/","TB_UPLOAD":"http://upload.tieba.baidu.com /"}};var Tbs = "b62b84c39c54e4971407421926";2cacc6d41bbb37262a98f745aa00fbf09c3bca370b5104690d9ef395f2c5f8d16c04bd5ca3fcae76e30b72ad730ca86dc9ccee2e6ea535a969eb3f532ad9fe89.forum_main{padding-left: 2px;}.forum_note{background-color: #FEFFDB; border: 1px solid #FFD99C;color: #6C6C6E;padding: 4px 15px;width:480px;}.forum_title{margin-top: 30px;}.forum_table{margin-top: 15px;}.forum_table table{width:100% ;ボーダー折りたたみ:折りたたみ; border: solid #DADFE8;border-width:0 1px 1px 0;}.forum_table table th, .forum_table table td { border-collapse:collapse; 境界線: 実線 #DADFE8; ボーダー幅:1px 0 0 1px; 垂直配置:中央; テキスト整列:中央; }.forum_table table th{font-size: 14px;font-weight: bold;height: 36px;}.forum_table table td{height: 36px;}.forum_tips{margin-top:20px;}.addfav{background-image: url("http://static.tieba.baidu.com/tb/static-member/img/blueplus.png");display: block;height: 25px;width: 73px;margin: 0 auto;cursor:pointer; }.canfav{background-image: url("http://static.tieba.baidu.com/tb/static-member/img/cancel_like.png");display: block;height: 25px;width: 98px;margin : 0 auto;}.canfav_text{color: blue;left: 28px;position: relative;top: 5px;cursor:pointer;}.cur_exp{color:#FF6E1B;cursor:pointer;}.s_icon{margin:4px;} .like_badge {background: url("http://static.tieba.baidu.com/tb/static-member/img/bg.png?v=1.0") no-repeat scroll 0 0 transparent;height: 25px;line -height: 25px;line-height: 24px9;_line-height: 24px;margin: 4px auto 0;position: relative;width: 85px;cursor:pointer;padding:0px;}.like_badge_title {color: #4C4C4C;font- family: arial,"宋体";高さ: 25px;left: 0;top: 0;line-height: 25px;line-height: 28px9;_line-height: 28px;position: absolute;text-align: center;width: 60px;margin-top:0px;margin-left:4px;}.like_badge_lv {color: #B65E00;font-family: arial;font-size: 11px;font-weight: bold;height: 25px;left: 60px;position : absolute;text-align: left;padding-left: 8px;width: 25px;}.badge_lv1 .like_badge_lv {background: url("http://static.tieba.baidu.com/tb/static-member/img/ s1.gif?v=1.0") no-repeat scroll 0 0 transparent;margin-top:1px;}.badge_lv2 .like_badge_lv {background: url("http://static.tieba.baidu.com/tb/static- member/img/s2.gif?v=1.0") no-repeat scroll 0 0 transparent;padding-top:1px;}.badge_lv2_1 .like_badge_lv {background: url("http://static.tieba.baidu.com/ tb/static-member/img/s3.gif?v=1.0") no-repeat scroll 0 0 transparent;padding-top:1px;}.badge_lv2_2 .like_badge_lv {background: url("http://static.tieba. baidu.com/tb/static-member/img/s4.gif?v=1.0") no-repeat scroll 0 0 transparent;padding-top:1px;}.badge_lv3 .like_badge_lv {background: url("http:// static.tieba.baidu.com/tb/static-member/img/s5.gif?v=1.0") 繰り返しなしスクロール 0 0 透明;パディング左: 4ピクセル;行の高さ: 20ピクセル;上: 1ピクセル;} .badge_lv3_1 .like_badge_lv {background: url("http://static.tieba.baidu.com/tb/static-member/img/s6.gif?v=1.0") no-repeat scroll 0 0 transparent;padding-left : 4px;line-height: 20px;top: 1px;}.badge_lv3_2 .like_badge_lv {background: url("http://static.tieba.baidu.com/tb/static-member/img/s7.gif?v= 1.0 インチ)リピートなしスクロール 0 0 透明;パディング左: 4 ピクセル;行の高さ: 20 ピクセル;上: 1 ピクセル;}.badge_lv4 .like_badge_lv {background: url("http://static.tieba.baidu.com/tb/static-member/img/s8.gif?v=1.0") no-repeat scroll 0 0 transparent;left: 58px;padding-left: 6px;padding-top: 4px;top: -3px;}.pt{cursor: pointer;}531ac245ce3e4fe3d50054a55f2659271cdb152c026eb29410a09b867e4b0091ac934ce527ba4ee7bac73047605448faf5d188ed2c074f8b944552db028f98a1a34de1251f0d9fe1e645927f19a896e8f99058dec749fce9da0c7a84093efc37吧名 01c3ce868d2b3d9bce8da5c1b7e41e5bbdeed8375862608bfddb960f60249994经验值 01c3ce868d2b3d9bce8da5c1b7e41e5bf277084928b285dbd4f8bc7a39f744b1等级 01c3ce868d2b3d9bce8da5c1b7e41e5badd1aac2ea73ffad8d462532d93de4f5取消关注 01c3ce868d2b3d9bce8da5c1b7e41e5bfd273fcf5bcad3dfdad3c41bd81ad3e5a34de1251f0d9fe1e645927f19a896e8b6c5a531a458a2e790c1fd6421739d1cb3609e75b1257eb59a55ebb0eb68a2adchrome5db79b134e9f6b82c0b36e0489ee08edb90dd5946f0946207856a8a37f441edfb6c5a531a458a2e790c1fd6421739d1ce3726bf156a02f8fff36b69330f863a669605db79b134e9f6b82c0b36e0489ee08edb90dd5946f0946207856a8a37f441edfb6c5a531a458a2e790c1fd6421739d1c4046ac114860205cc28f40fe9622d5ab1d03515ad640ffbea2fc05e5c30ee070Chrome+16b28748ea4df4d9c2150843fecfba68b3117e9fc45a27f137a229825ce313011216b28748ea4df4d9c2150843fecfba685db79b134e9f6b82c0b36e0489ee08edb90dd5946f0946207856a8a37f441edfb6c5a531a458a2e790c1fd6421739d1cbb9d7b369353384c65523c52e1cced484c0202088d70df3dbad750ec875643df 54bdf357c58b8a65c66d7c19c8e4d114b90dd5946f0946207856a8a37f441edffd273fcf5bcad3dfdad3c41bd81ad3e5a34de1251f0d9fe1e645927f19a896e8b6c5a531a458a2e790c1fd6421739d1c45a2772a6b6107b401db3c9b82c049c285cd534ac140ee61f8945068dd24508554bdf357c58b8a65c66d7c19c8e4d1148d2ed1c3bb01d61e94d3fbb60656888cgtabbs5db79b134e9f6b82c0b36e0489ee08edb90dd5946f0946207856a8a37f441edfb6c5a531a458a2e790c1fd6421739d1cfa8970665cab5fc1a7c367f96bf9d06257405db79b134e9f6b82c0b36e0489ee08edb90dd5946f0946207856a8a37f441edfb6c5a531a458a2e790c1fd6421739d1c28e68275c19bab55f70149a097c384461d03515ad640ffbea2fc05e5c30ee070水帝16b28748ea4df4d9c2150843fecfba68b3117e9fc45a27f137a229825ce313011116b28748ea4df4d9c2150843fecfba685db79b134e9f6b82c0b36e0489ee08edb90dd5946f0946207856a8a37f441edfb6c5a531a458a2e790c1fd6421739d1c435f3e70be91944d41e678dd939d19594c0202088d70df3dbad750ec875643df 54bdf357c58b8a65c66d7c19c8e4d114b90dd5946f0946207856a8a37f441edffd273fcf5bcad3dfdad3c41bd81ad3e5a34de1251f0d9fe1e645927f19a896e8b6c5a531a458a2e790c1fd6421739d1c52416d0191d25e1b2a24f17a2b0fc980圣安地列斯5db79b134e9f6b82c0b36e0489ee08edb90dd5946f0946207856a8a37f441edfb6c5a531a458a2e790c1fd6421739d1c57ad220fd04c046b85ff483bef47e40950965db79b134e9f6b82c0b36e0489ee08edb90dd5946f0946207856a8a37f441edfb6c5a531a458a2e790c1fd6421739d1c9dbb3e0a2d948f7abd2821ebe28062de1d03515ad640ffbea2fc05e5c30ee070追踪到底16b28748ea4df4d9c2150843fecfba68b3117e9fc45a27f137a229825ce313011116b28748ea4df4d9c2150843fecfba685db79b134e9f6b82c0b36e0489ee08edb90dd5946f0946207856a8a37f441edfb6c5a531a458a2e790c1fd6421739d1c
我需要的内容就是58c071aa74ad83cfda17254fda6a6983这两个xx的内容,请问如何匹配
是对的啊
$str=file_get_contents('test.txt');$find='/href="\/f\?kw=([^"]*?)"\stitle="([^"]*?)"/s'; preg_match_all($find,$str,$res); echo "<pre class="brush:php;toolbar:false">";print_r($res);echo "
";/*Array( [0] => Array ( [0] => href="/f?kw=chrome" title="chrome" [1] => href="/f?kw=gtabbs" title="gtabbs" [2] => href="/f?kw=%CA%A5%B0%B2%B5%D8%C1%D0%CB%B9" title="圣安地列斯" ) [1] => Array ( [0] => chrome [1] => gtabbs [2] => %CA%A5%B0%B2%B5%D8%C1%D0%CB%B9 ) [2] => Array ( [0] => chrome [1] => gtabbs [2] => 圣安地列斯 ))*/