Regex works in reg101 and BBEdit but not in KBM

Hello, the following regex to delete numbers at the end of lines works perfectly with BBEdit and Reg101 but not in the KBM clipboard action.

thanks in advance for your time and help

search : \d+$
replace with nothing

I solved my own problem. Simply use the BBEdit text factory action instead of clipboard regex.

The problem is that your Regex uses "$" in a way that means "end of string".
You need it to mean "end of line". Use the Regex modifier of "(?m)"

So, this Regex works as expected:

Replace with:

Example Output



1 Like