Someone on quora asked:
Well, you probably know the famous quote:
Some people, when confronted with a problem, think “I know, I’ll use regular expressions.” Now they have two problems. - Jamie Zawisnki
That being said, regular expressions can be a good approach for particular problems. Sifting through JSON however, does not sound like one of them. Why not? JSON is already a structured format that has elements you can easily iterate through using normal programming constructs. I’m assuming you mean using regular expressions to search through JSON data by treating the entire JSON object as a string. If instead you’re using regex matching on individual JSON elements, that’s probably fine.
- You can buy me a coffee!
- You can write a reply on your own site and submit the URL as a webmention via the form below.
- Or you can just contact me!