Click here to Skip to main content
15,909,242 members
Home / Discussions / C#
   

C#

 
GeneralMailmessage spaces in subject Pin
Larza12312-Dec-07 22:29
Larza12312-Dec-07 22:29 
GeneralI need to get a byte out of a string. Pin
Big Ralph12-Dec-07 22:27
Big Ralph12-Dec-07 22:27 
GeneralRe: I need to get a byte out of a string. Pin
m@u12-Dec-07 22:54
m@u12-Dec-07 22:54 
GeneralRegEx..... Pin
Siddharth Rastogi12-Dec-07 22:06
Siddharth Rastogi12-Dec-07 22:06 
GeneralRe: RegEx..... Pin
Guffa13-Dec-07 1:26
Guffa13-Dec-07 1:26 
GeneralRe: RegEx..... Pin
Siddharth Rastogi13-Dec-07 2:39
Siddharth Rastogi13-Dec-07 2:39 
GeneralRe: RegEx..... Pin
Guffa13-Dec-07 4:32
Guffa13-Dec-07 4:32 
GeneralRe: RegEx..... Pin
Siddharth Rastogi14-Dec-07 3:46
Siddharth Rastogi14-Dec-07 3:46 
string sPattern = @"[^\p{Cc}\\r\\n\\a\\e\\b\\t][\S]*[\w\p{Po}\s-`\p{Sm}]*[^\p{Cc}\\r\\n\\a\\e\\b\\t]";


try
{
if (Regex.IsMatch(txtText.Text, sPattern, RegexOptions.Multiline | RegexOptions.IgnoreCase))
{

objMatch = Regex.Match(txtText.Text, sPattern, RegexOptions.ECMAScript | RegexOptions.Compiled
| RegexOptions.Multiline | RegexOptions.IgnoreCase);

if (objMatch.Success)
lblDone.Text = objMatch.Value;

}//end (if (Regex.IsMatch...)

}//end(try)

finally
{
sPattern = null;
}//end (finally)



input string is :-- \r\nloadplayer "playername=test_1"\r\n

output string should be :-- loadplayer "playername=test_1"

want to neglect all newline,tabs.. etc from the input string.

Now its doing fine, but also removing "r,n,a,e,b,t" from the starting of the input string.

Means, if the input string is:-- roadplayer "playername=test_1"\r\n
output becomes:-- oadplayer "playername=test_1"
it should be:-- roadplayer "playername=test_1"


so, tell me what i should do for better working.

Thxx...

Enjoy!!
GeneralRe: RegEx..... Pin
Matthew Butler14-Dec-07 6:30
Matthew Butler14-Dec-07 6:30 
AnswerRe: RegEx..... Pin
Guffa14-Dec-07 7:29
Guffa14-Dec-07 7:29 
Generalreverse the listview Item Pin
azusakt12-Dec-07 21:10
azusakt12-Dec-07 21:10 
GeneralRe: reverse the listview Item Pin
Dave Kreskowiak13-Dec-07 4:24
mveDave Kreskowiak13-Dec-07 4:24 
GeneralRe: reverse the listview Item Pin
mav.northwind13-Dec-07 6:37
mav.northwind13-Dec-07 6:37 
GeneralConvert From DataTable to Excel Sheet Pin
Thaer Hamael12-Dec-07 20:45
Thaer Hamael12-Dec-07 20:45 
GeneralRe: Convert From DataTable to Excel Sheet Pin
pmarfleet12-Dec-07 21:49
pmarfleet12-Dec-07 21:49 
GeneralRe: Convert From DataTable to Excel Sheet Pin
Thaer Hamael12-Dec-07 22:40
Thaer Hamael12-Dec-07 22:40 
QuestionSplit Function Pin
Programm3r12-Dec-07 20:37
Programm3r12-Dec-07 20:37 
GeneralRe: Split Function Pin
Michael Sync12-Dec-07 21:10
Michael Sync12-Dec-07 21:10 
GeneralRe: Split Function [modified] Pin
blackjack215012-Dec-07 21:26
blackjack215012-Dec-07 21:26 
GeneralRe: Split Function Pin
Brady Kelly12-Dec-07 21:27
Brady Kelly12-Dec-07 21:27 
GeneralRe: Split Function Pin
Programm3r12-Dec-07 22:15
Programm3r12-Dec-07 22:15 
Generaldrawing lines in autocad from windows application Pin
Member 464262912-Dec-07 20:34
Member 464262912-Dec-07 20:34 
GeneralRe: drawing lines in autocad from windows application Pin
blackjack215012-Dec-07 21:37
blackjack215012-Dec-07 21:37 
GeneralSending email Pin
soso_online12-Dec-07 20:20
soso_online12-Dec-07 20:20 
GeneralRe: Sending email Pin
CKnig12-Dec-07 21:15
CKnig12-Dec-07 21:15 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.