-1

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?

adarshr
  • 61,315
  • 23
  • 138
  • 167
user1102999
  • 1
  • 1
  • 3

1 Answers1

2

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.

Sabuj Hassan
  • 38,281
  • 14
  • 75
  • 85