473,698 Members | 2,220 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

pattern for splitting address

Hi, i'm desperatly searching a regex pattern for split a list of
people address like this

ADDRESS
via a. pecoraro n. 4
p.zza sola, 14
via scardinata 117
via della scuola n.113
via n.ippolito, n.154/bis

in

ADDRESS: via a. pecoraro
N.RO: 113
ADDRESS: p.zza sola
N.RO: 14
ADDRESS: via scardinata
N.RO: 117
ADDRESS: via della scuola
N.RO: 113
ADDRESS: via n.ippolito
N.RO: 154/bis

The sample text i've pasted contains all combinations of
address-separator-civic number.

I've try with this pattern

(?<addr>.*)
(?<sep>,\s*(n.) ?)
(?<civ>.*)

but it doesn't work with al address and, sometimes, the splitted words
are wrong.

Who can help me? ;-)

TIA,
Simone.

Dec 14 '05 #1
0 936

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
1398
by: Hans Almåsbakk | last post by:
Hi, I have a problem which I believe is seen before: Finding the correct pattern to use, in order to split a line correctly, using the split function in the re module. I'm new to regexp, and it isn't always easy to comprehend for a newbie :) The lines I want to split are like this: (The following is one line, even if news client splits it up:)
5
1801
by: Ben | last post by:
I'm currently trying to develop a demonstrator in python for an ontology of a football team. At present all the fit players are exported to a text document. The program reads the document in and splits each line into a string (since each fit player and their attributes is entered line by line in the text document) using list = target.splitlines() The program then performs a loop like so:
6
2468
by: Earl Anderson | last post by:
I have a A97/XP applet I've developed for my own use in my department. My boss "suggests" that since I built it, I share it with and instruct the other 6 members of my department on its use. I've read many pieces on using the 'Database Splitter' Wizard, however I'm still unsure of what exactly will be the end result and what would remain for me to do afterwards. Being somewhat hesitant (aka Chicken) to do it without knowing all the...
6
2405
by: John Paulsson | last post by:
Is there a C# pattern or perhaps a .NET framework way of parsing a command lines, supporting quoted filepaths etc? (I'm not talking about the current applications command arguments. I've got command strings that I need to parse into an array)
15
2017
by: Robbie Hatley | last post by:
I was struggling to come up with a way to discern the actual bit patterns of the representations of C++ objects (esp. objects of small built-in types), and I came up with the following mess. But I'm wondering, is there an easier way to do this? This seems so klunky. #include <iostream> #include <cmath> template<typename T> void Binary(T const & object)
1
2719
by: Eric | last post by:
Hi: I have two files. I search pattern ":" from emails text file and save email contents into a database. Another search pattern " field is blank. Please try again.", vbExclamation + vbOKOnly Me.txtEmail.SetFocus Exit Sub End If Me.txtStatusBar.Value = "Parsing..." strEmail = Me.txtEmail.Value
34
11186
by: Steven Nagy | last post by:
So I was needing some extra power from my enums and implemented the typesafe enum pattern. And it got me to thinking... why should I EVER use standard enums? There's now a nice little code snippet that I wrote today that gives me an instant implementation of the pattern. I could easily just always use such an implementation instead of a standard enum, so I wanted to know what you experts all thought. Is there a case for standard enums?
2
7036
by: iritchie | last post by:
*(Apologies, I posted this in the SQL Server forum first) Hello all, I am trying to write a query which breaks down a single address field into individual fields, with char(10) or a carriage return as the delimiter. "empltable" is the table I am using, and "address" is the field I am looking to split. So far I have managed to:
2
1342
by: David Jackson | last post by:
Hello, The company I'm working for has taken over a smaller company with a fairly large customer base. We want to send an email to that customer base informing them of the takeover but the mailing list is not held in a database. In fact we've been given it as a Word document. The individual email addresses are in the format: "Name <address>" e.g. Bill Gates <billg@microsoft.com>;
0
9164
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8898
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7734
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6524
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5860
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4370
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3051
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2332
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2006
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.