Hello,
Thanks for your quick response, here is the regular expression I'm
having problems with:
(?<date>\d{4}-\d{2}-\d{2})(?<time>T\d{2}:\d{2}:\d{2}.\d{7}-)(?<hour>\d{2})(?<last>:\d{2})
The string that must match would be something like
"2006-04-06T14:03:33-03:00".
If I try to parse only that string(without the rest of the xml) it
works, but it doesn't if I try with the whole xml string.
NOTE: It does work in Visual Studio 2003, but not in 2005.
Thanks,
Brian
Brian Roisentul - 12 Oct 2006 14:41 GMT
Hey, I'm sorry I didn't show you the xml string.
Here it is:
"<NewDataSet><Table><tp_ID>1</tp_ID><tp_ListId>e86df149-dcae-4344-83e1-ef9be5bb99cb</tp_ListId><tp_SiteId>b98533db-58a3-48c2-af6e-62241e4afa26</tp_SiteId><tp_Version>7</tp_Version><tp_Author>1</tp_Author><tp_Editor>1</tp_Editor><tp_Modified>2006-04-06T14:03:33-03:00</tp_Modified><tp_Created>2006-03-21T17:27:52-03:00</tp_Created><tp_HasAttachment>false</tp_HasAttachment><tp_ModerationStatus>0</tp_ModerationStatus><tp_IsCurrent>true</tp_IsCurrent><tp_ItemOrder>100</tp_ItemOrder><tp_GUID>64686e35-f5d2-4c06-b2ac-f4188afd122e</tp_GUID><tp_Size>26</tp_Size><nvarchar1>All</nvarchar1><float1>1</float1></Table></NewDataSet>"
The fields that must match are "<tp_Modified>" and "<tp_Created>".
Thanks,
Brian
intrader - 12 Oct 2006 16:41 GMT
> Hey, I'm sorry I didn't show you the xml string.
>
[quoted text clipped - 7 lines]
>
> Brian
I think that I would start with an anchor, end with an anchor, don't use
Microsoft extras and express the Regular Expression as
/>(\d{4}-\d{2}-\d{2})?*?</
If your xml is well formed that should do it.