Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
rtutus
Aged Yak Warrior
522 Posts |
Posted - 2007-01-25 : 11:54:11
|
How to add the string \r\n to be taken into account in my regex plsHi, I have to maintain this can u help mer pls telling me why the regex does n find my sentence in the document:LRegex objAlphaNumericPattern = new Regex(">[ ]*[\\s]*[a-zA-Z0-9\x0600-\x06ff\x00DF\\r\\n,'?.\\-\\(\\):\"'&+!/?àáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿâêôûÄéÆÇàèÊùÌÍÎÏ][a-zA-Z0-9\x0600-\x06ff\x00DF,'?.\\-\\(\\):&\"'+!/?\\sàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿâêôûÄéÆÇàèÊùÌÍÎÏ]+[ ]*<");Here is the target sentence: MatchCollection result = objAlphaNumericPattern.Matches("<span class=ms-formvalidation>*</span>\r\n indicates a required field</span>");It s the \r\n that s causing the problem because if i remove then my regex matches the sentence without \r\n like this:MatchCollection result = objAlphaNumericPattern.Matches("<span class=ms-formvalidation>*</span> indicates a required field</span>");Thank youThanks |
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
|
|
|
|