[a / b / c / d / e / f / g / gif / h / hr / k / m / o / p / r / s / t / u / v / vg / vm / vmg / vr / vrpg / vst / w / wg] [i / ic] [r9k / s4s / vip / qa] [cm / hm / lgbt / y] [3 / aco / adv / an / bant / biz / cgl / ck / co / diy / fa / fit / gd / hc / his / int / jp / lit / mlp / mu / n / news / out / po / pol / pw / qst / sci / soc / sp / tg / toy / trv / tv / vp / vt / wsg / wsr / x / xs] [Settings] [Search] [Mobile] [Home]
Board
Settings Mobile Home
/wsr/ - Worksafe Requests

Name
Options
Comment
Verification
4chan Pass users can bypass this verification. [Learn More] [Login]
File
  • Please read the Rules and FAQ before posting.

08/21/20New boards added: /vrpg/, /vmg/, /vst/ and /vm/
05/04/17New trial board added: /bant/ - International/Random
10/04/16New board for 4chan Pass users: /vip/ - Very Important Posts
[Hide] [Show All]


[Advertise on 4chan]


File: 1736353074406.png (30 KB, 3840x2160)
30 KB
30 KB PNG
anyone have a regex filter for reddit filenames?
/g/ and their sqt aren't helping so we do it like this
>>
>>1509026
Can you give some examples of reddit filenames?
>>
>>1509026
>reddit filenames
what?
>>
>>1509037
not OP, but here are a few:
kc6aynbs8tbe1
7yjawszl5ube1.png
g0ml5v4b5pbe1.png
j5t8dd3ydnbe1.png
q75muhncnsyd1.jpeg
auxx88unbr6d1.jpeg
m2qf2e9q2r4d1.jpeg
pv9kmpc3ttbe1.jpeg
piySeo9.png
YXfRryB.png
>>
>>1509039
thank you, that's generally what I mean
>>1509037
>>1509038
pictures saved from reddit have a set pattern, same goes for how 4chan saves it images (right now it's 173...... and when the latest number reaches it goes to 174....... I don't remember exactly what it was but it had to do with a certain time system how every image uploaded follows).
the pattern for reddit is always a set amount, but letters and numbers differ. I suck at regex and can never get filters to work otherwise I would do it myself

I want it because every time an OP opens with a reddit filename, it's of zero worth. I hope to filter out such OP's. it's baffling that /g/ isn't helping
>>
>>1509041
Unix timestamp.
>>
>>1509043
yeah that one thanks
>>
>>1509041
>set pattern
Looks like a-z0-9 read right to left: 8ck616yacube1 is a recent filename, while g0ml5v4b5pbe1.png is older, so next would be ....dube1 .... eube1 etc. A month ago they ended in d1.
A general regex would filter too many 12 character names, but maybe just current month?

/^[0-9A-Z]{10}e1/i;boards:pol;op:only;
>>
>>1509048
cool thanks so much
>pol
it's actually for /v/, I already have 70 posts filtered at any time so a few more can't hurt
>>
>>1509048
>>1509050
change 10 to 11, I miscounted, they're 13 character names. So, for last two months:

/^[0-9A-Z]{11}d1/i;boards:v;op:only;
/^[0-9A-Z]{11}e1/i;boards:v;op:only;
>>
>>1509053
no problem, thanks for the correction.
I've been thinking. for the following months I could just keep going one letter up as in; f1, g1, h1 and so on?
or I could remove the letter+1 combo and just make the 11 into a 12? knowing that I'm gonna filter out a lot more filenames, even filenames not from reddit
>>
It's pretty difficult to filter it out without filtering regular stuff.
Any filter that would catch >>1509039 examples would almost certainly also catch reactionimage3.png also.
We can tell it's pseudorandom gibberish, regex can't.
>>
>>1509055
ah okay I see well I'm already happy with what I have so it's no biggie
>>
>>1509056
You could always use a negative lookahead to ensure the first x characters aren't all alphabetical, so something like this:
/^(?![A-Z]{11})[A-Z0-9]{11}[de]1/i;boards:v;op:only;
>>
>>1509057
I get the explanation but have no idea how the filter works, anyways that's also very appreciated
I'm going to sleep now but I'm grateful for the help



[Advertise on 4chan]

Delete Post: [File Only] Style:
[Disable Mobile View / Use Desktop Site]

[Enable Mobile View / Use Mobile Site]

All trademarks and copyrights on this page are owned by their respective parties. Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.