Question

Here is the response:

{"xxx", "yyy", "zzz":"abc,def"} 

(abc,def is not a constant string, every time it will change.)

For example, I want to rewrite "abc,def" so I use this Regex expression "zzz":"(*)+" and rewrite as "zzz":"rewrote!", but I got fail, Charles won't regex it, I think the Regex expression may wrong. If I want to rewrite it, what should be put in the Regex expression?

Was it helpful?

Solution

Considering your example "zzz":"(*)+", here (*)+ doesn't mean anything to your example.

You can replace it with "[^"]+" to match anything between quotes except the quote itself. For example:

"zzz":"[^"]+"

+ for at least a character in it. If you replace + with * it will be zero or more character.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top