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”: “”’""
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 not in scala and it gives the complete string after raw.
How can I achieve this?