You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
I have a need to search text in OneNote using a regular expression, but use part of the match in the replacement. For example, if the text in OneNote is "[12:00 PM]", I can use a regular expression to ensure that I'm getting the "[" at the beginning of the line with the time after using the regular expression "^[((1[0-2]|0?[1-9]):([0-5][0-9]) ?([AaPp][Mm]))]" (minus the quotations). However, the capture group that I have included does not work if I use something like "[1/1/2021 $1]" in the replace field, so instead of replacing the text with "[1/1/2021 12:00 PM]", the text is replaced with the literal "[1/1/2021 $1]".
Describe the solution you'd like
I would like to be able to use a regular expression similar to the one in the description above and have it interpolated in the replace field so I can search the instances, keep the desired portion of the string being searched, and add the additional text to the replacement.
Describe alternatives you've considered
The alternative I'm currently using is to manually change all the instances, which is very slow and inefficient.
Additional context
I got the idea from Notepad++, which has a similar feature. If you're aware of an alternative that could do something similar, I would greatly appreciate it. I am a novice programmer and have looked at the source code, although I was unable to determine if this would be a simple implementation that could be achieved by passing an additional argument or two to the Replace method to indicate using Regex.Replace instead of atom.Replace if the search/replace type is useRegex equals true. I hope it's that easy, although I understand that may not be the case and appreciate any and all consideration/effort you might expend on adding this request. Thank you!
THE FINE PRINT
This is a hobby project that I started for myself. I'm happy to take requests and will promise to consider each one carefully but offer no guarantees that I will ultimately agree to their usefulness or have time to implement any of them. If OneNote offers a "close enough" work-around then I will probably reject the request - you've been warned!
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
I have a need to search text in OneNote using a regular expression, but use part of the match in the replacement. For example, if the text in OneNote is "[12:00 PM]", I can use a regular expression to ensure that I'm getting the "[" at the beginning of the line with the time after using the regular expression "^[((1[0-2]|0?[1-9]):([0-5][0-9]) ?([AaPp][Mm]))]" (minus the quotations). However, the capture group that I have included does not work if I use something like "[1/1/2021 $1]" in the replace field, so instead of replacing the text with "[1/1/2021 12:00 PM]", the text is replaced with the literal "[1/1/2021 $1]".
Describe the solution you'd like
I would like to be able to use a regular expression similar to the one in the description above and have it interpolated in the replace field so I can search the instances, keep the desired portion of the string being searched, and add the additional text to the replacement.
Describe alternatives you've considered
The alternative I'm currently using is to manually change all the instances, which is very slow and inefficient.
Additional context
I got the idea from Notepad++, which has a similar feature. If you're aware of an alternative that could do something similar, I would greatly appreciate it. I am a novice programmer and have looked at the source code, although I was unable to determine if this would be a simple implementation that could be achieved by passing an additional argument or two to the
Replace
method to indicate usingRegex.Replace
instead ofatom.Replace
if the search/replace type isuseRegex
equals true. I hope it's that easy, although I understand that may not be the case and appreciate any and all consideration/effort you might expend on adding this request. Thank you!THE FINE PRINT
This is a hobby project that I started for myself. I'm happy to take requests and will promise to consider each one carefully but offer no guarantees that I will ultimately agree to their usefulness or have time to implement any of them. If OneNote offers a "close enough" work-around then I will probably reject the request - you've been warned!
The text was updated successfully, but these errors were encountered: