473,728 Members | 1,843 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Street address.

I need to find and replace US street address from HTML files in C# into
something like this:

[Some string: street address] street address [Some string2], how can I
do this using C# and Regular expression?


Nov 29 '05 #1
2 3177
Well, since you can do almost anything with regex, you may need to be more
specific with your question. The issues that are required is that you would
need a consistent string content. Regex requires predicable patterns in
order to function. Can you give us a real example of the content that needs
to be parsed.

"Zeya" <ze****@gmail.c om> wrote in message
news:11******** **************@ g47g2000cwa.goo glegroups.com.. .
I need to find and replace US street address from HTML files in C# into
something like this:

[Some string: street address] street address [Some string2], how can I
do this using C# and Regular expression?


Nov 29 '05 #2
Thanks Peter for your pronto response.

Here is the pattern:
Anything inside [] are optional, w - white space, anything inside {} is
information for this posts reader

31231 Street Address[w][[,] characters], City Name, State{2 characters}


31231 Street Address[w][[,] characters],
City Name, State{2 characters} 12345[[w]-[w]1234]

Nov 29 '05 #3

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

Similar topics

by: Sugapablo | last post by:
I have a database table that contains street addresses in the following format: 123 Any St. 456 Some Rd. 7789 That Blvd. etc. I.e. Street number, street name, standard abbriviation of road type.
by: Al Dykes | last post by:
Does anyone have an idea on how to find ZIP+4 codes? Thanks -- a d y k e s @ p a n i x . c o m Don't blame me. I voted for Gore.
by: wolftor | last post by:
Does anyone know how to create a query that will separate the street number from the street name? Eg. current address field = 14 Main Street, unit 4 but I want to get: streetno = 14 streetname = Main Street
by: Tom Warren | last post by:
About once a year or so for the last 10 years, I update my street address parser and I'm starting to look at it again. This parser splits a street address line into its smallest common elements (number, trailer, pre, name, suffix, post, unit, unit id). I always start this update process by searching Google-Groups and Google-web for anything new out there, but there is never very much. Has anyone run into anything in their travels?...
by: Michael C# | last post by:
Hi all, I'm about to start writing a routine to parse "standard" U.S. Addresses (if there is such a thing...) Before I jump off into this, I was just wondering if maybe someone out there had already seen some similar logic already implemented somewhere? Here's basically what I'm trying to do: 123 Sesame Street NW In this example, I want to parse out the Street Address as follows:
by: Robert Fitzpatrick | last post by:
Thanks to some help here on the list, I've been able to get addresses sorting pretty well, but now I have a issue with same addresses on different streets not grouping the streets. This is what I'm using a substring search in the ORDER BY statement now like in this view: SELECT tblhudsimilargroups.rems_id, tblhudsimilargroups.group_id, tblhudsimilargroups.similar_group_id, tblhudbuildings.address, tblhudbuildings.hud_building_id,...
by: Phoenix_ver10 | last post by:
I have a mailing list with multiple names going to the same addresses. I need one address with all the names for that address on it. I checked out the example on microsoft's site, but A: It doesn't work (error that there is an extra parenthise (sp?) ) and B: Will only let in two names for each record. If there are three, the middle on is deleted. Or to make things simpler, if nothing else, I'd like to add a field in the table that shows...
by: razjafry | last post by:
Hi Gurus, I have street address fields as Addr1, Addr2, City, PCode, Prov, Country. Then I have a check box asking if the mailing address is same as the street address. How I can populate all the corresponding mailing address fields automatically if someone checks the check box as Yes. I use mailing address fields as MailAddr1, MailAddr2, MailCity, MailPCode, MailProv, MailCountry. I really appreciate all the help. Thanks, Syed
by: wamap | last post by:
Hello , Can any one assist. I have a Street Address file and i want to split the information in the file into different columns. For example "100 SW 14th Street N, Suite 120" First. The script will capture the 100 into a new column called StreetNo. Was thinking of a scenario where the script does a count until it finds a space then stops. Second. The script will extract "SW" into another column called DirectionPrefix. So if it find...
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
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...
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,...
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
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...
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();...
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
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
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.