Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
I don't know, apart from wasting time by not going
if (preg_match('<regex-here>', $textmassage, $matches)) {
// $matches is was found and is available
} -
@R1100 so i figured out what the code does, but i dont know why someout would do this on a var named "$textmessage". Can you enlighten me?
-
@R1100 THIS ABOMINATION IS NO JOKE, THIS IS EVERYTHING I STAND AGAINST. IT'S A REASON TO WRITE IN CAPS AND IF I SEE ANY MORE OF THIS I MIGHT GO INSANE. Hm... shouldn't go to work on monday then...
-
If he's matching against one input string:
/((^[a-zA-Z])|([a-zA-Z]$))/m
If he's matching against entire lines:
/^.(?:[a-zA-Z])(.*)(?:[a-zA-Z])$/mg
or just use substring with 0 and -1
He'll learn eventually 😀
Can you guess what is he trying to do ? 😛
joke/meme