Extract Line-End Number
Read a reference number while copying a report
When: Clipboard Changed fires. If: The event’s Text contains slash-digits followed by a line break or the end of text. Do: Extract Text returns the first matching number, and Show Text or Image displays it.
The Condition and extraction use this newline-aware expression:
/(\d+)(?=\R|$)
For example, copying a report line ending in reference/123 shows 123 without an extra extraction shortcut. Capture group 1 omits the slash and newline.
Configure and try it
- Import the Rule and review both copies of the pattern, the first-match setting and capture group 1.
- Enable it and copy a disposable line ending in reference/123.
- Confirm that the result panel shows 123.
- Try the same line with a trailing newline and then without one.
- Copy ordinary text with no match; the Condition should skip the extraction.
- Adjust both patterns together for your actual report format.
Requirements and limits
Clipboard Changed and Extract Text require Pro. The Rule does not modify the clipboard, remove line breaks or edit the source document.
Only the first matching number is displayed. A space after the digits prevents this pattern from matching that line ending. A newline previously removed by another tool cannot be detected; the end-of-text alternative covers a final number without a newline.
Every matching clipboard-change event can show a panel, so enable this only when useful for the reports you are processing. For automatic content cleanup, compare Remove Emoji from Text.