php regular expression functions
$10-30 USD
Pago na entrega
I need two regular expression functions written that will parse text and return values from the text.
REGEX 1:
I need the function to return any integer after the first occurence of "bt"
So:
$string = "bt 10 He went to the store";
echo regex1($string):
This should result in:
10
$string = "bt 65 bt 12 I am happy bt 65 bt bob";
echo regex1($string);
gives:
65
$string = "btt 23 I am lonely";
echo regex1($string);
gives
NULL
$string = "bt 5.5 I am bob";
echo regex1($string);
gives
5
REGEX 2
This function returns the first alphanumeric (case insensitive) word following the first occurence of the word "bc" that is a color in the format #XXXXXX (up to six of the following characters ABCDEF01234567890) or is contained in an array of other options.
array("red", "blue", "green", "white");
$string = "I want to go to the movies bc #FFFFFF";
echo regex2($string);
gives
#FFFFFF
array("red", "blue", "green", "white");
$string = "I want to go to the movies bc red";
echo regex2($string);
gives
red
array("red", "blue", "green", "white");
$string = "I want to go to the movies bc 1red";
echo regex2($string);
gives
null
ID do Projeto: #4968962
Sobre o projeto
Concedido a:
Hello, I am a javascript and php programmer.I have read the job description. I can do this job perfectly as per your need and available now,thanks
8 freelancers estão ofertando em média $24 nesse trabalho
Hello drowningbizman, I have read your requirements, I'm a PHP Expert Developer and I am very confident to do this project. I guarantee complete satisfaction before payment. Please check PM for more details, Thank you!
My self Kartik Shah I have over 6 years experience to work in the web technologies and software field. I have experience to Work on: Technologies: php, mysql, sql-server, LAMP, ajax, JQuery, json, javascript, xml, Mais
Very easy task. I've been working with regular expressions alot. I can do it right now, or tomorrow.