Avatar of warturtle
warturtleFlag for United Kingdom of Great Britain and Northern Ireland

asked on 

Help with Regular Expressions

Hi,

I have a string

        s ='''740446505        "O'HANLON, Benjamin"'''

i need to use ONE RE pattern to convert it into
 
       (740446505, "O'HANLN", "Benjamin"),
including the brackets and the comma at the end.

I am using python 2.3 and have been stuydin the various tutotrials and the
howto websites for the past 3 days and haven't managed to find a solution.

Any help to get to the solution will be very very helpful.

Thanks,

Kunal
Python

Avatar of undefined
Last Comment
F. Dominicus
ASKER CERTIFIED SOLUTION
Avatar of F. Dominicus
F. Dominicus
Flag of Germany image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
Python
Python

Python is a widely used general-purpose, high-level programming language. Its design philosophy emphasizes code readability, and its syntax allows programmers to express concepts in fewer lines of code than would be possible in other languages. Python supports multiple programming paradigms, including object-oriented, imperative and functional programming or procedural styles. It features a dynamic type system and automatic memory management and has a large and comprehensive set of standard libraries, including NumPy, SciPy, Django, PyQuery, and PyLibrary.

6K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo