in reply to Commify function regex in Perl vs sed
certainly not a PM discussion, I moved it to SOPW and marked it as off-topic.
> WHAT IS WRONG???
The trick in Formatting numbers with commas is to reverse the string of numbers to operate from right to left and to use positive and negative look-aheads
Regarding SED: to my knowledge are neither look-ahead nor look-behind supported.
This
> "sed: -e expression #1, char 39: Invalid preceding regular expression"
should have been obvious.
The normal recommendation when sed fails is to use Perl instead. (yes seriously)
> I am trying to figure this out and AI wasn't able to help me. And I have tried to fool with this for hours to no use.
which proves the current wisdom that LLMs are only useful when used by someone with more expertise in the matter. (no insult intended¹)
Cheers Rolf
(addicted to the Perl Programming Language :)
see Wikisyntax for the Monastery
¹) but LOL²
²) SCNR in your case :-)
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Commify function regex in Perl vs sed (off-topic sed)
by harangzsolt33 (Deacon) on Sep 21, 2025 at 04:56 UTC | |
by LanX (Saint) on Sep 21, 2025 at 08:22 UTC |