[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y ] [Search | Free Show | Home]

Regular expressions. Can someone dumb them down for me? I'm

This is a blue board which means that it's for everybody (Safe For Work content only). If you see any adult content, please report it.

Thread replies: 26
Thread images: 6

Regular expressions. Can someone dumb them down for me?

I'm running 4chanx and I'd like to use the regular expressions function to block all that nikki sixx spam, but I don't know how.

I'm not a coder, at all. I just want to block posts with certain words in it like "sixx" and whatnot.

Can you help?
>>
So what you're asking for is a quick rundown huh?
>>
Dog's age fucking shit. Cats ftw.
>>
/sixx/i

wah-lah
>>
File: bird_9.jpg (4MB, 4608x2592px) Image search: [Google]
bird_9.jpg
4MB, 4608x2592px
>>58923012
Dogs are the reddit of pets.
>>
>>58923012
So not into sucking a log outta someone's rusty balloon knot huh?
>>
>>58923093
Yes. I've googled for tutorials and I they're a bit beyond my skill level.

>>58923155
>>58923223
I just grabbed a sfw pic at random

>>58923179
will this account for Capitals and words like Sixx's ?

>>58923243
I seriously don't understand that spammer. I get that someone thought puddi was funny and people are always pimping websites but this nikki sixx stuff mystifies me.

I don't understand why 4chin doesn't subnet ban or something.
>>
>>58923495
also, what about phrases like "log of shit" and "creamy log" and whatnot?
>>
>>58923537
alphanumeric (letters and numbers) are not treated specially by regex, so things like that can just be used as-is

here's a few examples;
>/creamy log/i
will match anything containing "creamy log", the "i" is a flag that means it will match any case (Insensitive)
>/one( two)? three/
words in brackets are capture groups, capturing isn't used for filtering, but they can also be modifies with things like "?", which means "optional"
this will match either "one two three" OR "one three"

i can help with other examples if you give me some types of phrases and variations you want to match
>>
File: quick_rundown.jpg (5KB, 250x175px) Image search: [Google]
quick_rundown.jpg
5KB, 250x175px
>>58923012
Youtube a regex tutorial and you should be able to write it yourself in 10 minutes
>>
File: 1475620670173.jpg (30KB, 563x89px) Image search: [Google]
1475620670173.jpg
30KB, 563x89px
>>58923012
OP please tell me you're not too dumb to read this and understand what it means....
>>
Like all shorthand, regular expressions are ugly, ugly things that tip the scale between function and accessibility to an absurd the degree. Enjoy learning some esoteric specialist's shorthand just because a programmer was too lazy to implement a more user-friendly "Find/Match Basic String With Wildcard" option.
>>
Can't believe no one suggested this yet:

https://regex101.com/

Go there OP, put a bunch of text into lower field and play around with top field - the regexp code.

>>58924513
Hilarious. Regexps are trivial to understand and remember and extremely useful.
>>
>>58924248
Did that and I was unable to make it work on 4chanX.

>>58924325
Maybe I am. Can you help me anyways?

>>58924513
I know I'm finding it difficult.

>>58924547
If they were trivial to understand they'd be taught in elementary school.

Can anyone help me out with a few useful examples that would or might help me block that spam?

I get that /sixx/i will filter the word "sixx", but what I need may be more complicated than that and I may not have the hours to invest in learning regex.

I just want to block that spam. Can anyone help me out?
>>
>>58924682
>I get that /sixx/i will filter the word "sixx", but what I need may be more complicated than that and I may not have the hours to invest in learning regex.
So tell me what you want to filter and I'll provide a rexep for you.

>trivial things do not exist outside of what is taught in elementary school.
anon please
>>
>>58923179
>wah-lah
ameriturd education everyone
>>
Dogs are for normalfags. Don't post again, ever.
>>
>>58924702

Alright, typical stuff found in this spam are "log of shit" "creamy log" all variations of "Sixx" that you can think of. "Sixx's" "warm log"

I take it you've never been on /b/ when this asshole gets home from jr high?
>>
>>58925524
No, I haven't been on /b/ in last maybe 5-7 years.

/log of shit/i
/creamy log/i
/sixx/i

You can go for an extreme and do

/log/i

but that's likely to filter out some non-spam posts also.
>>
>>58925524
/sixx/i;boards:b;op:yes;
/log of shit/i;boards:b;op:yes;
/(warm|creamy) log/i;boards:b;op:yes;
>>
>>58923012
Kek'd at that pic. People who have dogs are slaves to them. They have to constantly walk them outside, they have to play fetch with them, they get woken up in the middle of the night because the dog needs to crap, they can't walk outside in peace with a dog beside them because if there's another dog somewhere around, both dogs will go nuts.

Cats are so much smarter and you're not a slave to them.
>>
>>58925546
>>58925566
Thanks

>>58925576
Cats are cool and they're a popular pet but you can't argue that they really useful. You can't train to be service animals (police, military, handicapped, etc...) that's all the image is saying.

I've had several cats. One was poisoned by an asshole neighbor and the other died of diabetes. I loved my cats, and I love my dogs too.

My dogs will come with me hiking in the Rockies. I'd like to see a cat do that.
>>
>>58923179
>wah-lah
i hope that was at least ironic or something
>>
File: 4552.jpg (54KB, 690x388px) Image search: [Google]
4552.jpg
54KB, 690x388px
>>58923012
>implying cats can't detect drugs
>>
>>58928444
They can, but they wont tell anyone because they dont care like the little lazy fuckers they are.
>>
File: maxresdefault.jpg (140KB, 1679x941px) Image search: [Google]
maxresdefault.jpg
140KB, 1679x941px
>>58928632
t. cuck who picks up dog shit
Thread posts: 26
Thread images: 6


[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y] [Search | Top | Home]

I'm aware that Imgur.com will stop allowing adult images since 15th of May. I'm taking actions to backup as much data as possible.
Read more on this topic here - https://archived.moe/talk/thread/1694/


If you need a post removed click on it's [Report] button and follow the instruction.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com.
If you like this website please support us by donating with Bitcoins at 16mKtbZiwW52BLkibtCr8jUg2KVUMTxVQ5
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.
This is a 4chan archive - all of the content originated from that site.
This means that RandomArchive shows their content, archived.
If you need information for a Poster - contact them.