Notepad ++ search pattern

1) First I want to find text with a picture, for example

   app(abs(something),abs(something))

in large text using Notepad ++, the sample text shown below:

app(abs(any length of characters here),abs(any length of characters here)),
tapp(abs(any length of characters here),abs(any length of characters here)),
app(abs(any length of characters here),app(any length of characters here)),
app(abs(any length of characters here),some(any length of characters here)),
app(abs(any length of characters here)) ,abs(any length of characters here))

when I use "app (abs ((.?)), abs ((.?)))" to search, it finds the first and second lines in the above sample. The second line is not what I'm looking for. what is wrong with my expression?

2) If possible, I want the open and closed bracket () after each paragraph to match, for example

   "app(     abs(..(..)..),abs(..(..(...)..)..)   )"

but not like

   "app(abs((), abs())"

where the first abs has an inconsistent bracket.

Please give some advice!

Thanks in advance

+4
source share
3 answers

, Search Mode Regular expression ( Find) .

, , * . ( ) \ (( ) \). , :

str1\(str2\(.....\),str2\(........\)\)

, 5 .{5}

str1\(str2\(.{5}\),str2\(.{8}\)\)


,

, , . .? , . , appabsX,abs.

:

app\(abs\((.*)\),abs\((.*)\)\)

, t , . , - , . :

^ :

^app\(abs\((.*)\),abs\((.*)\)\)

(\ s +)

(\s+)app\(abs\((.*)\),abs\((.*)\)\)

, , ? *, :

^app\(abs\((.*?)\),abs\((.*?)\)\)
+3

Notepad ++?

, .

?

:

, , :

RegExr

+2

Like that:

^app\(abs\((.*?)\),abs\((.*?)\)\)

the checkbox in the search box "corresponds to a new line" must be unchecked.

Screen shot

0
source

Source: https://habr.com/ru/post/1655178/


All Articles