REGEX Recipe Ingredient Decode
$50-100 USD
Paid on delivery
Hello,
I am looking for somebody to write a regex script/function that will decode recipe ingredients into Ingredient, Modifiers, Amount, Unit. The problem is that not all recipes have the ingredients in the same format ex:
1 avocado // no units (assume each) also no modifiers
2 cups all purpose flour, sifted // has everything
olive oil // no amount, units, nor modifiers
brown sugar 2.5 cups // reversed, no modifier
brown sugar 2 1/2 cups // mixed number
brown sugar 2½ cups //mixed number with special char
2 #10 cans of tomato soup
tomato soup #10 can
I am hoping to have this written in php and if possible to have comments included to edit myself if I find a format not covered.
I know it cannot be perfect and will not catch all cases, could it give me an error flag if not found.
I can include a list of all units and modifiers I know of to assist.
Project ID: #7874580
About the project
3 freelancers are bidding on average $238 for this job
Hello! With 98% to 99% completion rate, 800+ successfully completed projects, and a 5.00 reputation (maximum possible, 5.0) (Yes, not even 4.99 average rating, can be verified on my profile page [login to view URL] More
Your requirement cant be fullfil by regex, but it can be possible by function, I can write a fuction that will seperate all. lets start