Does anyone on Sup Forums know regex? I have this string and need to remove everything except "Pepeman, hueman"...

Does anyone on Sup Forums know regex? I have this string and need to remove everything except "Pepeman, hueman", "Spiderman" and "Moot".

Pepeman, hueman A B C Spiderman B D Moot EF MON-FRI,-,


Currently I have 8 lines of shitty Java replace and replaceAll statements but i would like something more clean

Other urls found in this thread:

regex101.com/
den4b.com/?x=products&product=renamer
twitter.com/SFWRedditVideos

Your replace and replaceAll statements are probably more clean than the regex.

regex101.com/

OH SHIT IS GOOGLE DOWN?

But seriously, go to regexone and actually learn regex. Seriously worth the effort.

>Being this retarded

I really wonder what goes on in your mind, like are you really that stupid or are you just lazy? Can't you use your brain?

>Can't you use your brain?
no

...

Nice regex solution you got there. That's some really intellectual shit

(regex | intellectual)

It's been down 3 times so far. Has been back up a few minutes later though.

I only had problems with Sup Forumsmail though, not the search engine.

s/(Pepeman, hueman).*(Spiderman).*(Moot).*/\1 \2 \3/

(((Pepe|hue|Super)man)|Moot)

I think

Yeah, that's totally wrong. Pepeman, hueman, spuderman and moot can be anything. Only A B C D EF MON-FRI are static

([A-Z]{1,3} )|([A-Z]{3}.*)

use a gui tool retarded winbabby

den4b.com/?x=products&product=renamer

echo 'Pepeman, hueman A B C Spiderman B D Moot EF MON-FRI,-,' |sed -r -e 's/[A-Z][^a-z]//g' -e 's/\s[^a-zA-Z ]+//g'
output:
Pepeman, hueman Spiderman Moot

Try my solution
Proof attached.

>still using RegEx
>2006

short:
sed -r -e 's/[A-Z][^a-z]//g' -e 's/\s[^a-zA-Z ]+//g'

Thank you user, here's 3 indian dollars

>sed


dumb nigger