Street address.

  • Thread starter Thread starter Zeya
  • Start date Start date
Z

Zeya

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?

Thanks.
 
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.
 
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}
12345[[w]-[w]1234]

or

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