Click here to Skip to main content
15,884,388 members
Home / Discussions / C#
   

C#

 
Questionregex problem Pin
surfman198-Sep-05 8:53
surfman198-Sep-05 8:53 
AnswerRe: regex problem Pin
User 66588-Sep-05 9:13
User 66588-Sep-05 9:13 
GeneralRe: regex problem Pin
User 66588-Sep-05 9:20
User 66588-Sep-05 9:20 
GeneralRe: regex problem Pin
surfman198-Sep-05 9:35
surfman198-Sep-05 9:35 
GeneralRe: regex problem Pin
User 66588-Sep-05 9:51
User 66588-Sep-05 9:51 
GeneralRe: regex problem Pin
surfman198-Sep-05 10:01
surfman198-Sep-05 10:01 
GeneralRe: regex problem Pin
User 66588-Sep-05 10:11
User 66588-Sep-05 10:11 
GeneralRe: regex problem Pin
surfman198-Sep-05 10:21
surfman198-Sep-05 10:21 
hi,
yeah thats fine:
<br />
MatchCollection matchCollectionReceivers;<br />
Regex regex = new Regex(@"\s?([^;]+)");   <------- whats the '?' here? = AND?<br />
matchCollectionReceivers = regex.Matches(textBox_Receivers.Text);<br />
<br />
foreach (Match m in matchCollectionReceivers) <br />
{ <br />
	string str = m.Value;<br />
	if(str.StartsWith(" "))<br />
	{<br />
		str = str.Remove(0,1);<br />
	}<br />
<br />
	Receivers.Add(str);<br />
}<br />


advantage: less code lines than the .split() versionWink | ;-)

cu+thx
GeneralRe: regex problem Pin
User 66588-Sep-05 10:24
User 66588-Sep-05 10:24 
GeneralRe: regex problem Pin
User 66588-Sep-05 10:33
User 66588-Sep-05 10:33 
GeneralRe: regex problem Pin
surfman198-Sep-05 11:27
surfman198-Sep-05 11:27 
GeneralRe: regex problem Pin
User 66588-Sep-05 11:37
User 66588-Sep-05 11:37 
Question.cpp and .h files Pin
DaveC4269138-Sep-05 8:53
DaveC4269138-Sep-05 8:53 
AnswerRe: .cpp and .h files Pin
Alex Korchemniy8-Sep-05 9:09
Alex Korchemniy8-Sep-05 9:09 
GeneralRe: .cpp and .h files Pin
DaveC4269138-Sep-05 10:04
DaveC4269138-Sep-05 10:04 
AnswerRe: .cpp and .h files Pin
Christian Graus8-Sep-05 12:29
protectorChristian Graus8-Sep-05 12:29 
QuestionRemote Desktop like component Pin
Steve McLenithan8-Sep-05 8:03
Steve McLenithan8-Sep-05 8:03 
AnswerRe: Remote Desktop like component Pin
Alex Korchemniy8-Sep-05 8:49
Alex Korchemniy8-Sep-05 8:49 
Questionmultiple instances of the same dll using appdomain Pin
Peter Madsen8-Sep-05 6:51
Peter Madsen8-Sep-05 6:51 
AnswerRe: multiple instances of the same dll using appdomain Pin
Andy Brummer8-Sep-05 19:12
sitebuilderAndy Brummer8-Sep-05 19:12 
QuestionSourceSafe with C# Standard Pin
BazM8-Sep-05 6:33
BazM8-Sep-05 6:33 
AnswerRe: SourceSafe with C# Standard Pin
Alex Korchemniy8-Sep-05 9:14
Alex Korchemniy8-Sep-05 9:14 
GeneralRe: SourceSafe with C# Standard Pin
BazM8-Sep-05 9:43
BazM8-Sep-05 9:43 
GeneralRe: SourceSafe with C# Standard Pin
Alex Korchemniy8-Sep-05 10:05
Alex Korchemniy8-Sep-05 10:05 
Question.NET Remoting question Pin
Asad Hussain8-Sep-05 6:02
Asad Hussain8-Sep-05 6:02 

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.