Click here to Skip to main content
15,899,126 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: CMap template error Pin
Christian Graus4-Oct-02 11:09
protectorChristian Graus4-Oct-02 11:09 
GeneralRe: CMap template error Pin
Chris Losinger3-Oct-02 17:58
professionalChris Losinger3-Oct-02 17:58 
GeneralRe: CMap template error Pin
IGx894-Oct-02 7:52
IGx894-Oct-02 7:52 
GeneralRe: CMap template error Pin
Tomasz Sowinski4-Oct-02 0:11
Tomasz Sowinski4-Oct-02 0:11 
Questionapi available for this purpose? Pin
imran_rafique3-Oct-02 15:36
imran_rafique3-Oct-02 15:36 
Generalregular expression problems Pin
Roman Nurik3-Oct-02 13:33
Roman Nurik3-Oct-02 13:33 
GeneralRe: regular expression problems Pin
Jörgen Sigvardsson3-Oct-02 14:17
Jörgen Sigvardsson3-Oct-02 14:17 
GeneralRe: regular expression problems Pin
Jon Hulatt3-Oct-02 21:52
Jon Hulatt3-Oct-02 21:52 
There is no easy solution. How i've solved this in the past is to replace the matched pattern with something else, and loop, like this (perl) :-

$p="a,b,c,d,e,f,g,";
$matchcount=0;

while ($p=~s/([a-z],)//)
	print ++$matchcount.": ".$1."\n";


Note that I lose the * from your pattern; you only want to match 1 at a time. =~ is the pattern operator in perl; // are delimeters around a pattern; s/// substitutes the first pattern with the second, ie nothing in this case. $1 is a special var which contains the first stored match.


Incidentally though, if your pattern really is as simple as a comma separated list, you may as well use a Split type function (theres bound to be one in your regexp library. In perl again:-

$p="a,b,c,d,e,f,g,";
@results = split (/,/ ,$p);

foreach $result (@results)
{
  print $result."\n";
}


Hope that helps.

Signature space for rent. Apply by email to....
General*.bmp *.wbmp conversion Pin
3-Oct-02 12:27
suss3-Oct-02 12:27 
GeneralRe: *.bmp *.wbmp conversion Pin
Jörgen Sigvardsson3-Oct-02 13:35
Jörgen Sigvardsson3-Oct-02 13:35 
GeneralRe: *.bmp *.wbmp conversion Pin
Anonymous3-Oct-02 13:59
Anonymous3-Oct-02 13:59 
GeneralRe: *.bmp *.wbmp conversion Pin
Chris Losinger3-Oct-02 18:00
professionalChris Losinger3-Oct-02 18:00 
QuestionThis 'works' but would you ever want to ?? Pin
RedZenBird3-Oct-02 12:21
RedZenBird3-Oct-02 12:21 
AnswerRe: This 'works' but would you ever want to ?? Pin
RedZenBird3-Oct-02 12:49
RedZenBird3-Oct-02 12:49 
AnswerRe: This 'works' but would you ever want to ?? Pin
Jörgen Sigvardsson3-Oct-02 13:47
Jörgen Sigvardsson3-Oct-02 13:47 
GeneralRe: This 'works' but would you ever want to ?? Pin
RedZenBird3-Oct-02 14:46
RedZenBird3-Oct-02 14:46 
GeneralRe: This 'works' but would you ever want to ?? Pin
Jörgen Sigvardsson3-Oct-02 15:06
Jörgen Sigvardsson3-Oct-02 15:06 
GeneralRe: This 'works' but would you ever want to ?? Pin
RedZenBird3-Oct-02 15:16
RedZenBird3-Oct-02 15:16 
GeneralCAsyncSoccket Pin
moloko3-Oct-02 11:59
moloko3-Oct-02 11:59 
GeneralRe: CAsyncSoccket Pin
Alexthombra3-Oct-02 19:21
Alexthombra3-Oct-02 19:21 
GeneralRe: CAsyncSoccket Pin
moloko4-Oct-02 14:25
moloko4-Oct-02 14:25 
GeneralUndocumented Windows APIs Pin
uniken3-Oct-02 11:59
uniken3-Oct-02 11:59 
GeneralRe: Undocumented Windows APIs Pin
Andreas Saurwein4-Oct-02 0:33
Andreas Saurwein4-Oct-02 0:33 
GeneralCListCtrl OnColumnClick Pin
ns3-Oct-02 10:44
ns3-Oct-02 10:44 
GeneralRe: CListCtrl OnColumnClick Pin
Tomasz Sowinski3-Oct-02 10:52
Tomasz Sowinski3-Oct-02 10:52 

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.