Suoritettu

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.

Taidot: Python

Näytä lisää: 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

Tietoa työnantajasta:
( 0 arvostelua ) Melbourne, Australia

Projektin tunnus: #16537922

Myönnetty käyttäjälle:

gsoftwareinc

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

$10 USD 0 päivässä
(0 Arvostelua)
0.0

5 freelanceria on tarjonnut keskimäärin %project_bid_stats_avg_sub_26% %project_currencyDetails_sign_sub_27% tähän työhön

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 Lisää

$11 USD 10 päivässä
(62 arvostelua)
5.5
$15 USD 10 päivässä
(11 arvostelua)
4.2
$15 USD 10 päivässä
(0 arvostelua)
0.0
$15 USD 2 päivässä
(0 arvostelua)
0.0