I want to find all content between two characters, say A and B:
Asd;lfksjd;fsdfjs;ldfkB which would be sd;lfksjd;fsdfjs;ldfk
and replace them. How would I write this expression?
|
I want to find all content between two characters, say
and replace them. How would I write this expression?
| |||
|
feedback
|
|
You can match any character between A and B with the following RegEx:
This doesn't return A or B as part of the matched characters.
Edit: Notepad++ does not support lookahead/behind, so you can replace
with
instead. Note that this is greedy, so if have "AxB y AzB", you'll get "AB". To get "AB y AB", use
instead. *Edited non-greedy, | |||||
feedback
|
|
I'm very new to regular expressions so hopefully this works for you. I think A.*B would be the regular expression to search for. That is, search for A and B with zero or more things between them. This regular expression includes the A and B in the match so you'd have to add them back in with the replace. AreplaceB Would be the text to replace it with.
| |||||
feedback
|