Skip to content

Edit your last message with sed commands#823

Open
Grafcube wants to merge 1 commit intocommetchat:mainfrom
Grafcube:sed-edit-command
Open

Edit your last message with sed commands#823
Grafcube wants to merge 1 commit intocommetchat:mainfrom
Grafcube:sed-edit-command

Conversation

@Grafcube
Copy link
Contributor

@Grafcube Grafcube commented Mar 10, 2026

You can use sed commands like s/old text/new text to edit the last message you sent. It doesn't support all sed features, just simple text replacement.

Regex pattern: /\As\/([^\/]+)\/([^\n\r]*?)\/?\s*\Z/

If the pattern doesn't match, if the user hasn't sent a message in the last 20 messages or if the user is editing or replying to an event, it just sends it as a message.

You can use sed commands like `s/old text/new text` to edit the last
message you sent. It does not support all sed features, just simple text
replacement.

Regex pattern: `/\As\/([^\/]+)\/([^\n\r]*?)\/?\s*\Z/`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant