Comments (7)
Oops. Duh. The original wording is correct. I'm reading my binary backwards. Sorry for the noise. Closing.
from byteseek.
Hey, no problem. Thanks for trying to improve byteseek!
from byteseek.
@nishihatapalmer Thanks. Without opening another new issue, is the line ^~87 # 0x87 = 10000111. Match bytes without any of the bitmask bits set.
on the same syntax.md page correct? It seems to me that ^~87
should match all bytes with the first three and the last bits unset, i.e.,
00000000
00001000
00010000
00011000
00100000
00101000
00110000
00111000
01000000
01001000
01010000
01011000
01100000
01101000
01110000
01111000
Am I missing something here again?
from byteseek.
That's correct. An any match ~87 on its own would match all the bytes with any of those bits set, but the expression is negated with ^, so it will match all bytes without any of those bits set, which is the list you give.
from byteseek.
A simple way to understand the negation operator ^ is that it gives you a set of bytes containing all the bytes which weren't in the original set.
from byteseek.
Oh, yes, I understand the semantics of ~
, ^
, and &
; I was confused about the wording, but now I see that "without any of the bitmask bits set" means "without any of the bits in 10000111
set", i.e., all integers between 0 and 255 whose binary representation (as a string) starts with 0
and ends with 000
.
from byteseek.
I can see how it could be confusing... I'll either have to come up with some better examples, or a better explanation...
from byteseek.
Related Issues (20)
- SequenceMatcherCompiler fails to compile case insensitive strings.
- Regular expression syntax definition HOT 1
- Performance Issue with small alphabets and long texts HOT 47
- StringReader broken HOT 2
- Bounds checking does not look right HOT 2
- Design: should use Java charset names directly in regular expression language? HOT 5
- Prefix syntax for binary HOT 3
- Silent replacement of algorithms or throw an error? HOT 4
- Parse search strings as byteseek regexes, or just convert to byte arrays? HOT 8
- Support mark / reset in InputStreamReader HOT 2
- Support matching integer values or ranges > 8 bits HOT 5
- Returning the match including thr wildcards HOT 7
- Feature - return data matched. HOT 1
- Better documentation
- High level interface needed HOT 1
- Search and match variable length wildcards HOT 1
- Implement SBNDM search
- Implement HashChain search HOT 1
- MutableState has non-mutable initializations resulting in errors on deepCopy calls HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from byteseek.