The KeePass help file includes this info about T-REPLACE-RX:
Usage example. Let the user name field contain the e-mail address myname@example.com and the URL field {T-REPLACE-RX:!{USERNAME}!.*@(.*)!https://$1!}. When running the URL field, KeePass opens https://example.com.
This shows that the regex evaluator used for this does accept constructs that use the data found by the /Search/ expression to build the /Replace/ expression. The upshot of this is that you can build your own T-FIND-RX function by specifying a null replacement: {T-REPLACE-RX:/Text/(Search)/$1/}.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I guess this proposal boils down to "Is the convenience of having a separate {T-FIND-RX} command great enough to justify its existence?" Obviously, the OP thinks it does, but it probably depends more on how easy it would be to implement.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The KeePass help file includes this info about
T-REPLACE-RX:This shows that the regex evaluator used for this does accept constructs that use the data found by the
/Search/expression to build the/Replace/expression. The upshot of this is that you can build your ownT-FIND-RXfunction by specifying a null replacement:{T-REPLACE-RX:/Text/(Search)/$1/}.Hi!
Yes, I understand that the FIND can be used with REPLACE.
Idea is replace:
{T-REPLACE-RX:!{USERNAME}!.*@(.*)!https://$1!)}By:
https://{T-FIND-RX:!{USERNAME}!(?<=@).*!}Last edit: Miguel Motta 2023-03-29
No point in adding a Find version because the result is the same in a placeholder.
cheers, Paul
I guess this proposal boils down to "Is the convenience of having a separate
{T-FIND-RX}command great enough to justify its existence?" Obviously, the OP thinks it does, but it probably depends more on how easy it would be to implement.