I have a text file.
tart*)*98'bank'ksb64bank)(tart2d&f44bank
I want to replace to: I want search tart*.*bank and change "bank" to "replaced"
tart*)*98'replaced'ksb64bank)(tart2d&f44replaced
Thanks.
Find what: (tart.*?)(bank)
Replace with: \\1replaced
()
are for grouping so you can reference groups in replace with field like \\1
for first group .*
is greedy and it would match the rest of the string so ?
is for making .*
non-greedy and matching only until first bank
is not matched
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.