View previous topic :: View next topic |
Author |
Message |
topsuccess
Joined: 14 Apr 2012 Posts: 9
|
Posted: Sun Feb 09, 2014 8:45 am Post subject: [Solved] Is there a option, make period(.) do not match \n ? |
|
|
There is some lines:
API: GetProcAddress="FindWindowW"
API: GetProcAddress="PostMessageW"
API: GetProcAddress="GetProcessWindowStation"
API: GetProcAddress="EnumDesktopsW"
API: GetProcAddress="EnumWindows"
API: GetProcAddress="GetThreadDesktop"
API: GetProcAddress="SetThreadDesktop"
API: GetProcAddress="CloseDesktop"
API: GetProcAddress="EnumDesktopWindows"
In Akelpad 4.8.6, when I search "api.+Enum.+$" with Regular Expression checked, multiple lines be selected. If remove the last '$', all lines will be found. I don't want period(.) match '\n', but I haven't found such a option.
Last edited by topsuccess on Sun Feb 09, 2014 1:10 pm; edited 1 time in total |
|
Back to top |
|
 |
Drugmix
Joined: 08 Apr 2013 Posts: 582 Location: Win7SP1x64, APx64
|
Posted: Sun Feb 09, 2014 10:31 am Post subject: |
|
|
So what's the problem with "api.+Enum.+$"? |
|
Back to top |
|
 |
topsuccess
Joined: 14 Apr 2012 Posts: 9
|
Posted: Sun Feb 09, 2014 11:56 am Post subject: |
|
|
I hope to find *only* a line at a time, not multiple lines. |
|
Back to top |
|
 |
Drugmix
Joined: 08 Apr 2013 Posts: 582 Location: Win7SP1x64, APx64
|
Posted: Sun Feb 09, 2014 12:28 pm Post subject: |
|
|
Code: | api[^\n]+?Enum[^\n]+?$ |
. matches everything
[^\n] matches everything except \n |
|
Back to top |
|
 |
topsuccess
Joined: 14 Apr 2012 Posts: 9
|
Posted: Sun Feb 09, 2014 12:44 pm Post subject: |
|
|
Ah, so do it. Thank you. I try to remove second '?', such as "api[^\n]+?Enum[^\n]+$", and it still works. |
|
Back to top |
|
 |
topsuccess
Joined: 14 Apr 2012 Posts: 9
|
Posted: Sun Feb 09, 2014 12:58 pm Post subject: |
|
|
And I saw the following in the manual:
Code: | To make it non-greedy (old behaviour) use "?" after quantifier, like, "\d*?". |
It's why first '?' is needed. Now I know it all. Thanks. |
|
Back to top |
|
 |
Drugmix
Joined: 08 Apr 2013 Posts: 582 Location: Win7SP1x64, APx64
|
Posted: Sun Feb 09, 2014 1:48 pm Post subject: |
|
|
yrw |
|
Back to top |
|
 |
|