我有很多这种格式的行。我需要捕获带引号的文本 block (包括引号),但最后一个 block 可能为 null
(不带引号)。
"1" "Melbourne is the capital of Australia." "0" "Canberra is the capital of Australia."
"2" "New York is the capital of Florida." "0" "Tallahassee is the capital of Florida."
"3" "Paris is the capital of France." "1" null
赛后预计替换:
{"id":\1,"statement":\2,"correct":\3,"additional":\4},
最佳答案
关于java - 正则表达式将引号内的文本选择为组,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39560970/