Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
だから私はいくつかの類似したものを持つ大きな文字列を持っています。文字列の一部を見つけたいのですが、その一部を無関係にします。
例: "0" blah"11" "0" blah"3" "0" blah"6" "0" blah"600" "0"
I want to find ' blah"..." ' ここで '...' は数値で、'...' の値を取得できます
それを行う簡単な方法はありますか?
>>> import re >>> re.findall(r'blah"(\d+)"','"0" blah"11" "0" blah"3" "0" blah"6" "0" blah"600" "0"') ['11', '3', '6', '600']