Regex sed edit formatting

Commenti

3 commenti

  • Suskeyhose

    This would be absolutely fantastic. Even without real regex support, just having /g (or maybe even /c, so /gc would work) would be amazing.

    4
  • DefinitelyNotTheLaw

    I think having full regex support is a bit of a stretch to implement.  And the c option would be more work to implement (adding a confirmation interface to the web, mobile app, and desktop clients, etc.).  The only options I see in the sed manual (https://www.gnu.org/software/sed/manual/html_node/The-_0022s_0022-Command.html) that make sense to implement in a cross-platform chat app are `g` and `<number>`.  At very least, I'd like to have the trailing g option work -- that seems easy enough to add and would be really nice to have :)

    Related aside (bug?):  Currently, if you include a trailing slash in your Discord sed expression, it includes that slash in the replacement text. E.g. if your last message was "abcd", sending "s/abc/xyz/" will change your message to "xyz/d".

    1
  • 【◈︿◈】

    I don't think that it would be too hard to implement, as it is now it already uses the string.replace function. just needs to take whats between s/ and / then replace it with whats between / and /

    1

Accedi per aggiungere un commento.