Completed

Python 2.7 small code snippet and regex required

Hi,

I have a simple job that should take a good programmer only a few minutes.

The code will be used in Zapier and must be working in order to be considered delivered/complete.

Zapier uses Python 2.7

PART 1:

The string is in one of the following formats (INPUT):

2

1 adult

2 adults

1 adult, 1 child

2 adults, 1 child

1 adult, 2 children

2 adults, 2 children

1 adult, 1 child, 1 infant

1 adult, 1 child, 2 infants

1 adult, 2 children, 1 infant

1 adult, 2 children, 2 infants

2 adults, 1 child, 1 infant

2 adults, 1 child, 2 infants

2 adults, 2 children, 1 infant

2 adults, 2 children, 2 infants

The format of the result string needs to be in the following format (OUTPUT):

1,1,1

Examples:

INPUT => OUTPUT

2 adults, 1 child, 1 infant => 2,1,1

2 adults, 2 children => 2,2,0

2 adults, 1 infant => 2,0,1

2 => 2,0,0

PART 2:

I need 3 Python Regular Expressions to extract the OUTPUT from part 1:

INPUT:

2,3,1

OUTPUT:

Regex 1 => 2

Regex 2 => 3

Regex 3 => 1

Only bid if you can do both PART 1 and PART 2.

I am looking for this to be done very quickly.

Max budget is 5USD.

Skills: Python

See more: urgently required accountants at gummidipoondi & hospet 2 7 yrs, looking for python 2.7 6 python 3833 gtk warn, html javascript code simple, simple python code blackjack, simple date javascript code, simple captcha javascript code, small simple android application source code, small simple iphone source code, python mastermind code simple, source code parser regex, small simple ordering system javascript, small code simple game, small code projects outsource, simple registration javascript code, simple interest javascript code, online tender small code projects excel, flash code snippet installer, find replace code phpmyadmin regex, bebo code snippet app, 2checkout code snippet

About the Employer:
( 0 reviews ) Melbourne, Australia

Project ID: #16537922

Awarded to:

gsoftwareinc

I can get that done for you quickly! Just select my bid and you will get your script deliver fast...

$10 USD in 0 days
(0 Reviews)
0.0

5 freelancers are bidding on average $13 for this job

pkbsdmp

I am a python developer having 6 + experience in IT industry. I am expert in: * Python, Web Development (Django, Flask) * CSS, HTML5, Javascript, AJAX, JQuery, Bootstrap * REST API application development More

$11 USD in 10 days
(62 Reviews)
5.5
$15 USD in 10 days
(11 Reviews)
4.2
$15 USD in 10 days
(0 Reviews)
0.0
$15 USD in 2 days
(0 Reviews)
0.0