Replace bracket
-
Hi I would like ask about Replace put some words in the lines .I put on last line some new words but with bracket .The Notepad ++copy me by without bracket .I use $ and mark regular expresion .But replace is without bracket . like this
AAAAA()(((((Aaaa – replace but I need also bracket .It is any way tell notepad ++ copy replace {}{{ {{(() ) bracket .?
-
@olek ,
Your question is almost unintelligible.
If you are in regular expression mode, and you want your REPLACE WITH to output parentheses
(), you need to escape them, so if you wanted to output a literal(Text Goes Here), you would have to make REPLACE WITH:\(Text Goes Here\)If I have misunderstood your question, see the Useful References below, especially "Template for Search/Replace Questions). And if you want to study Notepad++ regular expressions, start with the “Searching/Regex” in the User Manual.
If you need more help than that, you’ll have to put more effort into making your question understood.
----
Useful References
-
@PeterJones said in Replace bracket:
(Text Goes Here)
Sorry for my English
I have to add something like this at the end of the sentences:\ (hss(ssss(ow()=Ay(),(5)))) replace .but after replace I do not have brackets . how to replace it with brackets .?
-
Hello, @olek, @peterjones and All,
In addition to the @peterjones’s reply, here are some hints :
In the zone
Replace with, any character represents the character itself EXCEPT FOR :-
The opening parenthesis which must be written
\( -
The closing parenthesis which must be written
\) -
The anti-slash character which must be written
\\
Depending of the context, the three characters, below, may, sometimes, be escaped in order to be interpreted as literals. These are :
-
The dollar sign
-
The exclamation mark sign
-
The colon punctuation sign
For example, the regex search/replacement :
-
SEARCH
(?-i)^ABC$ -
REPLACE
\( {} [] Test \\ $ \))
would change any line with the uppercase string ABC :
ABCby this OUTPUT :
( {} [] Test \ $ )Best Regards,
guy038
P.S. :
I’ve just seen your second post. Thus, from above, in order to get the string
\ (hss(ssss(ow()=Ay(),(5))))in the replace dialog, it should be written :REPLACE
\\ \(hss\(ssss\(ow\(\)=Ay\(\),\(5\)\)\)\) -
-
@olek ,
Formatting the post per the advice in the useful references is critical for getting your point across. I’m still not 100% clear on what you want.
But if what you want in the output is the literal text:
(hss(ssss(ow()=Ay(),(5))))Then you would have to escape each of those
(and)as\(and\), so
REPLACE WITH =\(hss\(ssss\(ow\(\)=Ay\(\),\(5\)\)\)\)
Using that in Regular Expression mode will result in(hss(ssss(ow()=Ay(),(5)))) -
@PeterJones need be escape and bracket will be copy complicity.
REPLACE \ (hss(ssss(ow()=Ay(),(5))))
Thank you very much.