我想從下面的多行字符串中檢索Auth=
值。我試過Python re.match
沒有成功。如果我能得到任何幫助,我會感激嗎?使用Python Re模塊從多行中提取文本
SID = DQAAALsAAABCeyCMlOaYMHkv55TUQFxA71fxE1LpgpmL1G_o8YennFwBhar2I_LNmJjGjvLHVQy8tSRfYdLnUIHhKyD0FTZBzXyG_s8U4Pt97n9hPz68ZFSM42Qv6Qxuk74TQygHJXhjLWXNuD5mMsh8_MAs-nmhSToNFIyWoP-uTZ_LN2yQS1o9MB43fzuIIxp-1euXGxMceVVrjyidrYeEB13HS5kMHH-HGjiZhoIJBmu5es7pLPj9Ie8NJZ1K3kFhdVEJa4sLSID = DQAAAL4AAACypRIVyVXcs5zYIeUEt9v-wEwPKgQ8Oe23_URsDeHCg-rR2qQK4dTxPV1J6BPTO-6Zly2H9t4sVhm0vHe8IT6sKLdX2IQ8PgGMtSHQNkpQ8zEan0CyFyUetbSW4af6mlk2pksDpvXNm5GtNTj5eTwkCQUmgGep42u5iuCGFy-o9a1cQWz45NO_J8zIYnBdOqlheNTqaMWpi4hpr-_u8Muzs4RjlEbkuYfDu7MrdsJAFwxf0BVW2cGBtB-K2jwaK7wAuth = 873hdyjsbcvuei73hckwoxnaodbc8dnskc8HU1mKRqxh6yEU-9tqx148GqC7h90_190ZzxpEZOHAH5HTptliylRXvMPyqPyijMNu21bOA6ZhvZFuL8YNB3KF63YuV0n5TFJd1-rMI2LQIdPMVBnsxnEGrLIeFOugAFCZ_3OelAc4XjeKdDvIowxkNnvaooXT4kxtkQWzieA3JRKy3Y-Lbi7E0qiXC99GtHVDh5VWvdTs2LCv3wnRULtLp6ZCoToZ8qoUWMzU9PZldsKSn E
向我們展示您的代碼不工作 – stema 2011-06-15 21:39:01
嘗試're.search'。 'match'只匹配字符串的開頭。 http://docs.python.org/library/re.html#search-vs-match – 2011-06-15 21:39:23