T
Termux4w ago
Jacubb

Sed regex replacement fails to occour for no reason

.
4 Replies
Jacubb
JacubbOP4w ago
find . -type f -name "*.html" -exec sed -i -E 's/\w+\s+</</g' {} +
find . -type f -name "*.html" -exec sed -i -E 's/\w+\s+</</g' {} +
if I do a simple
find . -type f -name "*.html" -exec sed -i -E 's/a//g' {} +
find . -type f -name "*.html" -exec sed -i -E 's/a//g' {} +
all a gets replaced successfully but the first, the first one does NOT work and I dunno why i cannot understand, I tried to test on regex101 and it matches --- disclaimer I got that command from an ai chat bot, idk sed, i just know regex myself ---
NoNameForIdea
NoNameForIdea4w ago
Not related to Termux
Jacubb
JacubbOP4w ago
this is the html file:
Jacubb
JacubbOP4w ago
i was just wondering, sorry for the bothrr

Did you find this page helpful?