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
July 16, 2016 - 22:45
Your replace and replaceAll statements are probably more clean than the regex.
July 16, 2016 - 22:48
OH SHIT IS GOOGLE DOWN?
But seriously, go to regexone and actually learn regex. Seriously worth the effort.
July 16, 2016 - 22:50
>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?
July 16, 2016 - 22:50
>Can't you use your brain? no
July 16, 2016 - 22:51
Nice regex solution you got there. That's some really intellectual shit
July 16, 2016 - 22:56
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.
July 16, 2016 - 22:58
s/(Pepeman, hueman).*(Spiderman).*(Moot).*/\1 \2 \3/
July 16, 2016 - 22:59
(((Pepe|hue|Super)man)|Moot)
I think
July 16, 2016 - 23:00
Yeah, that's totally wrong. Pepeman, hueman, spuderman and moot can be anything. Only A B C D EF MON-FRI are static
July 16, 2016 - 23:01
([A-Z]{1,3} )|([A-Z]{3}.*)
July 16, 2016 - 23:01
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
July 16, 2016 - 23:07
Try my solution Proof attached.
July 16, 2016 - 23:08
short: sed -r -e 's/[A-Z][^a-z]//g' -e 's/\s[^a-zA-Z ]+//g'
July 16, 2016 - 23:10
Thank you user, here's 3 indian dollars
July 16, 2016 - 23:11