Skip to main content
Stack Overflow
  1. About
  2. For Teams

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

How do I replace the closing bracket also?

I have a couple of sentences in parentheses in a couple of files in a folder and I need to find and remove the opening bracket and replace the closing bracket of every parenthesis with a hyphen/dash (-). I don't know if Notepad++ is the best to use for this but I opened one of those files with Notepad++, selected the Regular Expression mode and put this in the "Find" field:-

(<!--.*?-->|<style[\S\s\n]*?</style>|<script[\S\s\n]*?</script>|rgb\(\d+,\x20\d+,\x20\d+\))(*SKIP)(*F)|\((.+?\))\s*again

and

1ドル - again

in the Replace in files field to replace (Mal&eacute;) again with Mal&eacute; - again but when I hit Replace, the closing bracket is not removed. Please give me the correct Regular Expression to replace the parentheses. This is part of one of the files that can be used as a sample for testing the above RegEx:-

<!-- (Malé) -->
<p>(Mal&eacute;) again</p>
<p style="font-family: &quot;verdana&quot;; font-size: 18px; color: rgb(0, 0, 0);">Mal&eacute; again</p>
<style>
code {
 font-family: &quot;verdana&quot;;
 font-size: 18px;
 color: black;
 font-weight: bold !important;
 line-height: 1.6 !important;
 }
@media (min-width: 1281px) {
code {
 font: 24px "verdana" bold !important;
 }
}
</style>
<script type="text/javascript">
function googleTranslateElementInit() {
 new google.translate.TranslateElement({pageLanguage: 'en'}, 'google_translate_element');
}
</script>

Answer*

Draft saved
Draft discarded
Cancel
1
  • As it’s currently written, your answer is unclear. Please edit to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers in the help center. Commented Jul 3, 2025 at 16:38

AltStyle によって変換されたページ (->オリジナル) /