Regular Expressions for a pattern

Hi Scala Users,

Actually, I am trying to create a regex pattern to match a pattern in a Json file. Json file consists of the following kind of patterns -
Examples - “raw”: “”\\""
“raw”: “true”
“raw”: “”’""
so basically raw attribute can have any type of value between double quotes. I want to match all the patterns like this and replace it with “*” of the same length at that place.

I created a pattern “”"“raw”:(".*")""".r which works fine normally in editor but in scala it is not working and it gives the complete string after raw.
Please suggest How can I achieve this?

Hi,
It might be helpful, as it’s more exact for the samples and expected output, if you provided your, even non-working, code.
Thanks,
Brett

Some of your " came through as the curly versions, like . Are they in your regex? If so it won’t work.