211 reputation
29
bio website henning.makholm.net
location Copenhagen, Denmark
age 41
visits member for 3 years, 4 months
seen 6 hours ago

Dec
24
awarded  Yearling
Dec
24
comment How do regular expressions work in htaccess to redirect an IP range
@Zerobinary99: Not quite. The parenthesised block here consists of three parts, separated by |s. It matches anything that matches one of the parts. The first part is [0-9][0-9]?\. which matches a digit, perhaps followed by another digit (a ? makes the thing immediately before it optional), followed by a full stop (a lone . has the special meaning of matching any single character, but \. matches just only a full stop). The second part is 1[0-8][0-9] which matches 3-digit numbers from 100 through 189. The third part is 19[0-3], matching 190, 191, 192, and 193.
Dec
24
comment How do regular expressions work in htaccess to redirect an IP range
@Zerobinary99: No, that wouldn't match xxx.xxx.114.99, because the 4 is not matched by [0-3] (which matches only the digits 0, 1, 2, or 3). For that you would need something like ^xxx\.xxx\.([0-9][0-9]?\.|1[0-8][0-9]|19[0-3]) -- pretty monstrous, but regexes are not really made to do numerical ranges well.
Dec
24
comment How do regular expressions work in htaccess to redirect an IP range
@Zerobinary99: The basic syntax is that [blah] matches b or l or a or h. If you want to match a whole range of characters (according to ASCII ordering, or your locale's collation order if you're blessed with a fancy unicode-aware regexp engine), then you can just put the first and last character in the range, separated by -. So [ad-gm] is the same as [adefgm] and [3-5] is the same as [345]. You can write [8-9] if you want; it is the same as [89].
Dec
24
answered How do regular expressions work in htaccess to redirect an IP range
Dec
24
awarded  Critic
Oct
27
comment Executing Commands In Parallel That Never Finish
What do you mean by "one after another" if the first one never finishes? When do you want the second one to start?
Oct
20
awarded  Editor
Oct
20
revised Run Python scripts without explicitly invoking `python`
it's not bash that reads the shebang line
Oct
20
suggested approved edit on Run Python scripts without explicitly invoking `python`
Sep
24
comment What is the relationship between Unix, Linux, Ubuntu and Debian?
Linux is not "based on Minix" in a meaningful way, except that Linus had seen the Minix source before he set out to see if he could make something like that himself. There's no code pedigree from Minix in Linux.
Jul
21
awarded  Popular Question
Jul
20
comment Why did the IETF specifically choose 192.168/16 to be a private IP address class?
@FrankThomas: Are you saying that matching for 168 would be easier to produce an ASIC circuit for than matching for some other 8-bit constant would be? I'm no hardware designer, but I find that difficult to believe.
Jul
20
comment Why did the IETF specifically choose 192.168/16 to be a private IP address class?
That doesn't seem to explain the choice of 168 in particular. I can't see any reason why 10101000 would be easier to decode than 10101010 or 10101001 -- in either case one needs to match all 8 bits before one knows the address belongs to the private network. Intuitively it seems more likely that 192.168 was simply the first appropriately-sized block that was available when the allocation was made, than the particular bit pattern 10101000 somehow being easier to decode than other patterns of the same length.
Apr
22
comment Why are laptop screens sized the way they are?
TV today is usually produced in 16:9, but most movies use wider formats yet, up to around 12:5.
Apr
2
comment Strange dotless decimal notation of IP address… How does it work?
@Izkata: Unlikely because that address would be in an unallocated and reserved part of IPv6 address space.
Mar
10
asked How to edit Firefox URL autocomplete weights
Apr
5
awarded  Notable Question
Mar
19
comment How to configure arrow key scroll step in Firefox
That works, thanks! Don't know how I could have overlooked that setting.
Mar
19
accepted How to configure arrow key scroll step in Firefox