regex: How to find €

General discussion related to "Everything".
Post Reply
therube
Posts: 4610
Joined: Thu Sep 03, 2009 6:48 pm

regex: How to find €

Post by therube »

regex: How to find €

No results: regex:\x80

Should that work?

Code: Select all

Everything
Version 1.4.1.877 (x86)
Windows NT 5.1
Processors 2
IsAdmin 1
AppData 0
Service 1
cmdline "C:\DEV\Locate\Everything.exe"
WM_ACTIVATE 00000000 00000000, lastfocus 00380486, current focus 00380486
WM_ACTIVATE 00000001 00000000, lastfocus 00380486, current focus 00000000
WM_ACTIVATE 00000000 00000000, lastfocus 00380486, current focus 00380486
WM_ACTIVATE 00000001 00000000, lastfocus 00380486, current focus 00000000
search '\' filter '' sort 0
term 03541000, flags: 1940, next: 00000000, notnext: 00000000
folderop: 1, fileop: 1, term: \
SET SORT 0
found 0 folders, size 0, db search time taken: 0.000025 seconds
found 0 files, size 0, db search time taken: 0.000785 seconds
total size 0, calculated in 0.000001 seconds
set sort 0 1
already sorted
finished sort, time taken 0.000101 seconds
update selection 0.000001 seconds
DB_WAIT: _db_ready_proc waiting...
DB_WAIT: _db_ready_proc waited 0.000061 seconds
new results
search '\x' filter '' sort 0
term 03541028, flags: 1940, next: 00000000, notnext: 00000000
folderop: 226, fileop: 226, term: \x
SET SORT 0
found 0 folders, size 0, db search time taken: 0.009872 seconds
search '\x8' filter '' sort 0
DB_WAIT: db_query_search waiting...
found 0 files, size 0, db search time taken: 0.031637 seconds
DB_WAIT: db_query_search waited 0.002614 seconds
term 03520210, flags: 1940, next: 00000000, notnext: 00000000
folderop: 226, fileop: 226, term: \x8
no search history hwn
SET SORT 0
found 0 folders, size 0, db search time taken: 0.011093 seconds
search '\x80' filter '' sort 0
found 0 files, size 0, db search time taken: 0.073801 seconds
DB_WAIT: db_query_search waiting...
DB_WAIT: db_query_search waited 0.001068 seconds
term 03704cf0, flags: 1940, next: 00000000, notnext: 00000000
folderop: 226, fileop: 226, term: \x80
SET SORT 0
found 0 folders, size 0, db search time taken: 0.025966 seconds
found 0 files, size 0, db search time taken: 0.566751 seconds
total size 0, calculated in 0.000001 seconds
set sort 0 1
already sorted
finished sort, time taken 0.001016 seconds
update selection 0.000001 seconds
DB_WAIT: _db_ready_proc waiting...
DB_WAIT: _db_ready_proc waited 0.001391 seconds
when ready 11 0000002d 00000000
when ready 11 0000002d 00000000
when ready 11 0000002d 00000000
when ready 11 0000002d 00000000
when ready 11 0000002d 00000000
when ready 11 0000002d 00000000
when ready 11 0000002d 00000000
when ready 11 0000002d 00000000
new results
WM_ACTIVATE 00000000 00000000, lastfocus 00380486, current focus 00380486
Four files found: regex:€

Code: Select all

Everything
Version 1.4.1.877 (x86)
Windows NT 5.1
Processors 2
IsAdmin 1
AppData 0
Service 1
cmdline "C:\DEV\Locate\Everything.exe"
search 'regex:?' filter '' sort 5
term 03540ee8, flags: 1940, next: 00000000, notnext: 00000000
folderop: 6, fileop: 6, term: ?
SET SORT 4
found 0 folders, size 0, db search time taken: 0.003951 seconds
found 4 files, size 65540, db search time taken: 0.089237 seconds
total size 8812161, calculated in 0.000002 seconds
set sort 5 1
SET SORT 3 5
finished sort, time taken 0.000094 seconds
update selection 0.000001 seconds
DB_WAIT: _db_ready_proc waiting...
DB_WAIT: _db_ready_proc waited 0.000039 seconds
new results
WM_ACTIVATE 00000000 0e11048e, lastfocus 005b04c4, current focus 005b04c4

XP
1.4.1.877
ovg
Posts: 294
Joined: Thu Oct 27, 2016 7:19 pm

Re: regex: How to find €

Post by ovg »

Why \x80?

Code: Select all

regex:\x{20AC}
therube
Posts: 4610
Joined: Thu Sep 03, 2009 6:48 pm

Re: regex: How to find €

Post by therube »

Why?
Why not ;-).

So teach me something, or point to to where to find it, if you would.

Code: Select all

PROGRAM AREA CLEARED
                    
READY               
>? ATH("80")        
€                   
Hex editor sees it a $80$

Code: Select all

2D 2D 2D 2D 2D 30 80 2D 97 2D 0D 0A
Vim finds € with \%x80.


So, I must be confusing things, myself... just what?
What, I'm confusing unicode & hex & regex?
(Sound like I'm all mixed up.)


And while we're at it, (\x80 vs \x{80}), \x alone is only good for 2 (hex) characters?
Where { } will allow for more?
ovg
Posts: 294
Joined: Thu Oct 27, 2016 7:19 pm

Re: regex: How to find €

Post by ovg »

Hmm, I can't find € as \x80, only as \x{20aC}. May be due to Russian Locale? Neither Ultraedit nor RegexBuddy ....
therube wrote: And while we're at it, (\x80 vs \x{80}), \x alone is only good for 2 (hex) characters?
Where { } will allow for more?
I think this is right
therube
Posts: 4610
Joined: Thu Sep 03, 2009 6:48 pm

Re: regex: How to find €

Post by therube »

This, http://www.ltg.ed.ac.uk/~richard/utf-8. ... 0&mode=hex, points to, Code point.

(Which doesn't really get me anywhere, except at least I'm seeing "80" ;-).)

Likewise, € in "character" mode, http://www.ltg.ed.ac.uk/~richard/utf-8. ... &mode=char, shows a "20AC".
void
Developer
Posts: 15342
Joined: Fri Oct 16, 2009 11:31 pm

Re: regex: How to find €

Post by void »

€ is 0x80 in code page 1252 (Windows ANSI).
€ is 0x20ac in unicode.

Everything Perl Compatible regex uses unicode.

\x must have one or two following digits:
\xd or \xdd

\x{dddd} can have any number of digits.
ovg
Posts: 294
Joined: Thu Oct 27, 2016 7:19 pm

Re: regex: How to find €

Post by ovg »

Thank you, David!
Post Reply