-
guybrush.hackint.org*** Notice -- TS for #archiveteam-ot changed from 1655942825 to 1567805912
-
ivan
-
JAAAbout time :-)
-
JAAThanks to funding from ... the US Food and Drug Administration‽ twitter.com/jasonbaumgartne/status/1537540118084476942
-
systwiN00B question regarding `sed' (I'm using BSD `sed' but GNU `sed' also works): How do I match, but not replace, the "[&?]lang=" matched?
-
systwiI got this far:
-
systwised 's/[?&]lang=\(chn\|eng\|jpn\|rus\)/something/'
-
systwiSo an example situation would be: foobar?lang=rus -> foobar?lang=something
-
systwiWhich, as you could probably tell, that ? could also be a &.
-
JAAsystwi: At least GNU sed supports backreferences in the replacement pattern. So `sed 's/\([?&]lang=\)\(chn\|eng\|jpn\|rus\)/\1something/'` should work.
-
systwiDoes [?&]lang= need to be wrapped in parentheses?
-
JAAYes, that's what creates the \1 capture group.
-
systwiAhh, gotcha. Trying it out.
-
systwiWorks with GNU `sed', thanks. :)
-
JakeI was wondering about the FDA thing as well, hahaha.
-
systwiHad to switch it up a bit for BSD `sed', but it works! :D
-
systwised -E 's/([?&]lang=)(chn|eng|jpn|rus)/\1something/'
-
systwiFor some reason, escaping the second set of parentheses broke the backreferencing.
-
JAAhexa-: ^ This might be one of those weird 'Remote host closed connection' cases.
-
JAA'Remote host closed the connection'*
-
hexa-JAA: ok
-
hexa-they're reconnected to another server now, which apparently makes for a stable connection
-
systwiIs there an SVG version of the AT Warrior logo?