Updated because I clicked the reply button before it was actually done.
Updated because I clicked the reply button before it was actually done.
Basic concept: the purpose of regex is to search input text for matching patterns of characters.
Assuming this is correct (including the spaces):
/ ^(\d{3}) - (\d{2}) - (\d{5}) \2 \1$ / g
Then:
/ The first forward slash is the delimiter which tells the code that this is the start of the regex (start interpreting the expression after this).
^ The caret marks the beginning of the text string being searched for a match or the beginning of a line of text, meaning that any matches found by the following regex must begin at the beginning of the input text, or at the beginning of a new line of text, not somewhere in the middle of it.
(\d{3}) This is the first group for matching actual text characters. The \d matches any single digit (0-9). The {3} attached to it means that there must be exactly 3 digits adjacent to each other, no more, no less.
_\_ (underscore indicating that there is a space in the original expression) This must match a [space][dash][space] as literal characters.
(\d{2}) As before, this matches two adjacent digits. This is the second matching group.
_\_ Same as above, [space][dash][space].
(\d{5}) Same as the two patterns before, this matches five adjacent digits. This is the third group.
_\2 The [space] here matters, indicating that there must be a space character between the previously matched group of five digits and the following match group \2, which says to match the same text as the most recently matched 2nd group. In this case the second group would be (\d{2}), so this must match the same two digits as were matched by (\d{2}) in the same order.
_\1 Similar to the above, this must match a [space] and then the same text as the first most recently matched group. In this case that would be the (\d{3}).
This is the same as the ^, only it matches the end of the input text or the end of a line of text. This means that there cannot be any more characters in the input text after the last characters that match the specified pattern.
/ g The / is again a delimiter, indicating the end of the regex. The g means “global”, which instructs the code to search the entire input text for all possible matches and return all of them at the end of the search (default regex behavior is to search until the first match, then stop and return that result).
So example matches would look like this:
111 - 22 - 33333 22 111
012 - 01 - 01234 01 012
987 - 98 - 98765 98 987
But this would not match:
11 - 222 - 33333 222 11 (incorrect numbers of digits in the first and second groups)
012 - 01 - 01234 10 012 (the second group of 2 digits does not match the first group of 2 digits)
987-98-9876598987 (spaces are missing)
111 22 33333 22 111 (dashes are missing)
Speculation:
The matched string looks like a serial number or part number or something like that, so probably the use case for this regex is to search through a file containing a long list of such numbers all separated on new lines of text, to find specific ones (for some reason). Maybe numbers that match this pattern are invalid, or maybe only numbers that match this pattern are valid and everything else that might be in the file needs to be removed.
Based on this I think the end is actually wrong and should be / gm (m for multi-line) to allow for searching (and returning) multiple lines of input text. Otherwise, this should be part of code which splits the lines of the input text file into individual strings and then feeds them through the regex one at a time - but if that’s the case then using the g (global) flag doesn’t really make sense.
With thanks to https://regex101.com/
It’s all inside of me, it’s all inside of me
It’s all inside of me, it’s all inside of my head


Hooray, it is of indeterminate wattage.
In the context of economies of scale, I think it’s possible that a lot of these laser pointers are made with surplus Blu-ray diodes, which have obviously been produced in mass quantities. It would explain why they can be had so cheaply.
There’s probably a Port-a-Jon out there thats been in service for decades and seen thousands of construction sites and county fairs &etc.


The fact that this is labelled as a “flashlight” and the product listing doesn’t tell you anywhere that it’s actually a laser is shady as fuck. The seller is probably trying to dodge safety regulations.
There’s a review on the same product from a different seller that has a close-up of the label:

This is a 50W laser, which is pretty dangerous. Just looking at the reflection spot where the laser hits something could damage your eyes, and never mind looking directly into the beam. If you’re going to use something like this you should be wearing properly tested safety glasses rated for that frequency, not the cheapos that come with it.
Edit: that safety label is definitely wrong. Class III lasers are between 5 and 500 mW, so this is probably 500mW and not 50000mW, which makes a lot more sense because you’d never fit that in an object this size.
The fact that the safety label is wrong makes this thing even worse.
Will wonders never cease?
Hmm, what if the toilet fixture was replaced due to age/damage/upgrade, but is still in the same location connected to the same drain? Is it the same toilet? Does a toilet of Theseus count, or does the counter restart?
Too real to be funny.
Fuck.


Every single generative model in existence was produced by stealing the work of artists for training data.
There is no nuance to this. Never mind the argument about generative AI taking away potential future work from artists. The training of these models is theft now. To use these models is to be complicit in the theft.
Edit: the people who downvote this while making no counterargument are doing so because they wish to remain in denial, so that they do not have to admit to themselves that they are complicit in the theft.


Every single generative model in existence was produced by stealing the work of artists for training data.
There is no nuance to this. Never mind the argument about generative AI taking away potential future work from artists. The training of these models is theft now. To use these models is to be complicit in the theft.
Edit: the people who downvote this while making no counterargument are doing so because they wish to remain in denial, so that they do not have to admit to themselves that they are complicit in the theft.



Ah, but if it’s bad enough the Internet will remember it forever:

https://en.wikipedia.org/wiki/Ecce_Homo_(García_Martínez_and_Giménez)
I hope you’re not judging Tom on his perspectives on bookshelves?
choco upgrade all
Not a built-in, of course, but chocolatey gets you Linux-like package manager behavior on Windows. With it you can run headless software installs and automatically update software. It’s great for remote/VM management.
This definitely seems like a possible use case, but personally I think practical application of sed would be a bit advanced for a “Regex 101” course.