in reply to Re^2: Regex replacing Brackets with horizontal tabs and newliners
in thread Regex replacing Brackets with horizontal tabs and newliners

I have a working script using CPAN, yet my manager said its way too easy and I should try achive the same thing by using only regex

That's plain stupid and a waste of time. If your manager regularly behaves like this, search for another job. It's just not worth wasting your time this way. Been there, done than.

Imagine a carpenter's manager telling him to put way all tools except for a rock with a sharp edge. Sure, you could build a house with that rock. But using modern tools is less risky and way faster.

Alexander

--
Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)
  • Comment on Re^3: Regex replacing Brackets with horizontal tabs and newliners

Replies are listed 'Best First'.
Re^4: Regex replacing Brackets with horizontal tabs and newliners
by Fletch (Bishop) on Sep 07, 2022 at 20:40 UTC

    I was thinking about making a similar comment waffling between being slightly more tactful or much less so WRT said manager. JSON is a standard, there's off the shelf parsers for it that have been extensively tested. If you stick to "just" regexen you're reimplementing a perfectly good wheel for no benefit at the cost of less testing, a custom implementation that may not handle everything valid by the spec, may need tricky extra stuff like embedded code in the regex to get corner cases, . . .

    As a learning exercise, sure maybe. Production code? Inane is probably being kind.

    The cake is a lie.
    The cake is a lie.
    The cake is a lie.