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.
正規表現を使用してPOST/GETパラメータのリストを選択するにはどうすればよいですか?たとえば、次のようなものです。
request.POST.regex(/^inputs_/)
import re input_keys = [key for key in request.POST if re.match(r"^inputs_", key)]
つまり、正規表現はここではやり過ぎです。
input_keys = [key for key in request.POST if key.startswith("inputs_")]