It works for me in VB.Net and C# uses the same Regex object. Can you post
the code you are using so I can see why it is not working for you?
Robby
"BigAl" <BigAl@discussions.microsoft.com> wrote in message
news:7739F1F9-3985-4555-9544-55075AFBA142@microsoft.com...[color=blue]
> I've tried both SingleLine and MultiLine options, and neither seem to
> work.
>
> "Robby" wrote:
>[color=green]
>>
>> One way to solve this is to set the multiline option,
>> RegexOptions.Multiline.
>>
>> Dim regexCityLine As New Regex( _
>> "^.*\d{5}(-\d{4})?.*$", _
>> RegexOptions.Multiline)
>>
>> Robby
>> VB.Net
>>
>>
>> "BigAl" <BigAl@discussions.microsoft.com> wrote in message
>> news:EE20FFCD-EE56-47DA-9CA9-0CBED9F5640A@microsoft.com...[color=darkred]
>> > Perhaps someone here can help me out...
>> >
>> > RegEx: "^.*\d{5}(-\d{4})?.*$"
>> > Intended Purpose: To strip out the City/State/ZipCode line from a
>> > signature.
>> > Sample Text:
>> >
>> > Joe Jackson
>> > 131 W. 5th Street
>> > New York, NY 10023
>> >
>> > RegEx Should Return: "New York, NY 10023"
>> >
>> > 1) This RegEx works correctly in Excel using "Microsoft VBScript
>> > Regular
>> > Expressions 5.5" object library
>> > 2) This RegEx works correctly with web-based .NET processor on
>> >
http://www.regexlib.com/RETester.aspx
>> > 3) This RegEx DOES NOT WORK in .NET v1.1 (well, at least not for me!)
>> > 4) I found the article "FIX: The Regex class and the Match class may
>> > not
>> > correctly find matches for a regular expression" on Microsoft Support
>> > site
>> > (
http://support.microsoft.com/default...;en-us;822923),
>> > however
>> > the
>> > versions of the files that they say create the fix are OLDER than the
>> > ones
>> > I
>> > have, so perhaps this is a fix for .NET v1.0. ???[/color]
>>
>>
>>[/color][/color]