次の文字列があるとします。
For the AWSDataTransfer product, this is the public pricing plan.
Regarding data transfer across EC2 AZs:
In all AWS regions, inbound is $0.01/GB.
In all AWS regions, outbound is $0.01/GB.
次のようなJSONに変更したいと思います。
{
"Product" : "AWSDataTransfer",
"PlanName" : "public",
"EC2Regional" : [
{"region" : "all", "type" : "in", "rate" : "0.01/GB"},
{"region" : "all", "type" : "out", "rate" : "0.01/GB"}
],
}
正規表現を使用してこれを行うにはどうすればよいですか。誰でもコードを書いて助けてくれませんか。