AkelPad Forum Index AkelPad
Support forum
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

[Solved] Is there a option, make period(.) do not match \n ?

 
Post new topic   Reply to topic    AkelPad Forum Index -> Discussion (English)
View previous topic :: View next topic  
Author Message
topsuccess



Joined: 14 Apr 2012
Posts: 9

PostPosted: Sun Feb 09, 2014 8:45 am    Post subject: [Solved] Is there a option, make period(.) do not match \n ? Reply with quote

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
View user's profile Send private message
Drugmix



Joined: 08 Apr 2013
Posts: 446

PostPosted: Sun Feb 09, 2014 10:31 am    Post subject: Reply with quote

So what's the problem with "api.+Enum.+$"?
Back to top
View user's profile Send private message
topsuccess



Joined: 14 Apr 2012
Posts: 9

PostPosted: Sun Feb 09, 2014 11:56 am    Post subject: Reply with quote

I hope to find *only* a line at a time, not multiple lines.
Back to top
View user's profile Send private message
Drugmix



Joined: 08 Apr 2013
Posts: 446

PostPosted: Sun Feb 09, 2014 12:28 pm    Post subject: Reply with quote

Code:
api[^\n]+?Enum[^\n]+?$

. matches everything
[^\n] matches everything except \n
Back to top
View user's profile Send private message
topsuccess



Joined: 14 Apr 2012
Posts: 9

PostPosted: Sun Feb 09, 2014 12:44 pm    Post subject: Reply with quote

Ah, so do it. Thank you. I try to remove second '?', such as "api[^\n]+?Enum[^\n]+$", and it still works.
Back to top
View user's profile Send private message
topsuccess



Joined: 14 Apr 2012
Posts: 9

PostPosted: Sun Feb 09, 2014 12:58 pm    Post subject: Reply with quote

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
View user's profile Send private message
Drugmix



Joined: 08 Apr 2013
Posts: 446

PostPosted: Sun Feb 09, 2014 1:48 pm    Post subject: Reply with quote

yrw
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    AkelPad Forum Index -> Discussion (English) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


SourceForge.net Logo Powered by phpBB © 2001, 2005 phpBB Group