Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ability to Use Regex $ Notation (Captured Groups) in Replace Field #1717

Open
D-Maxwell opened this issue Nov 7, 2023 · 0 comments
Open

Comments

@D-Maxwell
Copy link

Feature description

I wish we were able to use regex as a means to replace, reformat and refactor text besides being able to search for specific character strings.

Feature motivation

Say there are bits of the shape n\d scattered all around within a text document (e.g. n1, n2, n17, ...). If I were to wish to format those as mermaid graph nodes, as in n1[`n~1~`] (which I've now come to realise Notable does not support, as it would seem markdown is not rendered within mermaid blocks ; perhaps because it is disabled inside of code blocks in general ? Unless I'm missing an update which hasn't been suggested to me for some reason), then the regex operation I would run would be similar to the following :
search : (n)(\d*)
replace : $1$2["`$1~$2~`"]

However it would seem referring to previously captured groups through $ notation is not supported. I wish it were.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant