Copy link to clipboard
Copied
Why is this regular expression executed only once for a paragraph.
I want to find the [] that is not at the beginning of the paragraph
Expression: (?<!^)+(\[\d+\])
--------------------------------------------------------------------------------------------
For example, in the second paragraph, it ends when you find [3], and [4] cannot be found. I hope to find and replace all the matches in this paragraph one by one
Use this:
.\K(\[\d+\])
i.e. look for [\d] preceded by any character, which is equivalent to 'look for [\d] not at the start of the paragraph'.
P.
Copy link to clipboard
Copied
Use this:
.\K(\[\d+\])
i.e. look for [\d] preceded by any character, which is equivalent to 'look for [\d] not at the start of the paragraph'.
P.