Disclaimer: I know the square root of sod all about regular expressions and no amount of searching seems to change that :-X
Ok, so I have several edits to the Tapatalk code to change the way it works in my forum.
One of the many changes I've made has been to detect and remove the signature applied by the Tapatalk plugin.
I've been using this to great effect so far
$_POST['message'] = preg_replace("/Sent from my (\S*) using Tapatalk/", '', $_POST['message']);
This works a treat as it allows me to detect and remove text such as
Sent from my XT108 using Tapatalk
Sent from my CDL-229 using Tapatalk
However it will not detect where the incoming string contains multiple components, such as:
Sent from my Samsung FunFone using Tapatalk
Sent from my XT560 CCD using Tapatalk
Any regexperts in the house able to assist?
Cheers
that's because \S doesn't catch white spaces specifically, this works better
/Sent from my (.*) using Tapatalk/
Works a treat!
Thanks buddy.