2 ms·
>I wonder about photography. s/photography/photoshop er, s/graphy/shop Regex minimalism FTW :)
by fuzztester 3y ago
>I wonder about photography.
s/photography/photoshop
er,
s/graphy/shop
Regex minimalism FTW :)
- turnsout 3y agoUntil it matches “lithography” :P
- fuzztester 3y agoNice catch :), except that I accounted for that above, that's why I quoted the parent's single line, to mean that the substitution applied only to it. But it would have been more clear if I had written it thusly: echo "I wonder about photography." | sed 's/graphy/shop' Also, if the expression had been wrong, other words too could cause it to fail, like videography, filmography, orthography, etc.