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?