Click here to Skip to main content
15,908,166 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionRe: C++ : pass a string array to LPARAM Pin
CPallini28-Aug-12 9:59
mveCPallini28-Aug-12 9:59 
AnswerRe: C++ : pass a string array to LPARAM Pin
Atlence28-Aug-12 10:28
Atlence28-Aug-12 10:28 
QuestionRe: C++ : pass a string array to LPARAM Pin
CPallini28-Aug-12 22:58
mveCPallini28-Aug-12 22:58 
AnswerRe: C++ : pass a string array to LPARAM Pin
Atlence29-Aug-12 7:29
Atlence29-Aug-12 7:29 
AnswerRe: C++ : pass a string array to LPARAM Pin
Stefan_Lang27-Aug-12 23:08
Stefan_Lang27-Aug-12 23:08 
Questionhow to send a slider's value while scrolling.? Pin
mbatra3127-Aug-12 2:41
mbatra3127-Aug-12 2:41 
AnswerRe: how to send a slider's value while scrolling.? Pin
Chris Losinger27-Aug-12 3:18
professionalChris Losinger27-Aug-12 3:18 
AnswerRe: how to send a slider's value while scrolling.? Pin
pasztorpisti27-Aug-12 4:27
pasztorpisti27-Aug-12 4:27 
Questionneed help with vector<student*>* students pointer Pin
neodeaths27-Aug-12 0:28
neodeaths27-Aug-12 0:28 
AnswerRe: need help with vector* students pointer Pin
Maximilien27-Aug-12 0:45
Maximilien27-Aug-12 0:45 
QuestionRe: need help with vector* students pointer Pin
David Crow27-Aug-12 2:34
David Crow27-Aug-12 2:34 
AnswerRe: need help with vector* students pointer Pin
Stefan_Lang27-Aug-12 23:30
Stefan_Lang27-Aug-12 23:30 
Questionfrom sync TCP/IP to async Pin
bkelly1326-Aug-12 15:42
bkelly1326-Aug-12 15:42 
AnswerRe: from sync TCP/IP to async Pin
pasztorpisti26-Aug-12 22:25
pasztorpisti26-Aug-12 22:25 
GeneralRe: from sync TCP/IP to async Pin
bkelly1327-Aug-12 2:41
bkelly1327-Aug-12 2:41 
GeneralRe: from sync TCP/IP to async Pin
pasztorpisti27-Aug-12 4:24
pasztorpisti27-Aug-12 4:24 
GeneralRe: from sync TCP/IP to async Pin
jschell27-Aug-12 8:24
jschell27-Aug-12 8:24 
QuestionAccessing extra keys on a PS2 mouse without driver Pin
David Gvozdenovic26-Aug-12 4:57
David Gvozdenovic26-Aug-12 4:57 
AnswerRe: Accessing extra keys on a PS2 mouse without driver Pin
pasztorpisti26-Aug-12 5:41
pasztorpisti26-Aug-12 5:41 
QuestionCreateProcess and Detect when tthis process Ends.. Pin
Drakesal26-Aug-12 1:25
Drakesal26-Aug-12 1:25 
AnswerRe: CreateProcess and Detect when tthis process Ends.. Pin
pasztorpisti26-Aug-12 3:18
pasztorpisti26-Aug-12 3:18 
AnswerRe: CreateProcess and Detect when tthis process Ends.. Pin
Stephen Hewitt26-Aug-12 5:01
Stephen Hewitt26-Aug-12 5:01 
GeneralRe: CreateProcess and Detect when tthis process Ends.. Pin
Drakesal26-Aug-12 21:07
Drakesal26-Aug-12 21:07 
QuestionConvet Perl regular expression to equivalent ECMAScript regular expression Pin
Falconapollo25-Aug-12 18:49
Falconapollo25-Aug-12 18:49 
Now I'm using VC++ 2010, but the
C++
syntax_option_type
of VC++ 2010 only contains the following options:

C++
static const flag_type icase = regex_constants::icase;
static const flag_type nosubs = regex_constants::nosubs;
static const flag_type optimize = regex_constants::optimize;
static const flag_type collate = regex_constants::collate;
static const flag_type ECMAScript = regex_constants::ECMAScript;
static const flag_type basic = regex_constants::basic;
static const flag_type extended = regex_constants::extended;
static const flag_type awk = regex_constants::awk;
static const flag_type grep = regex_constants::grep;
static const flag_type egrep = regex_constants::egrep;

It doesn't contain
C++
perl_syntax_group
(Boost Library has the option). However, I don't want to use the Boost Library.

There are many regular expression written in Perl, So I want to convert the existing Perl regular expressions to
C++
ECMAScript
(or any one that VC++ 2010 support). After conversion I can use the equivalent regular expressions directly in VC++ 2010 without using the third party libray.

One example:

C++
const boost::tregex e(__T("\\A(\\d{3,4})[- ]?(\\d{4})[- ]?(\\d{4})[- ]?(\\d{4})\\z"));
const CString human_format = __T("$1-$2-$3-$4");
CString human_readable_card_number(const CString& s)
{
   return boost::regex_replace(s, e, human_format);
}
CString credit_card_number = "1234567887654321";
credit_card_number = human_readable_card_number(credit_card_number);
assert(credit_card_number == "1234-5678-8765-4321");


In the above example, what I want to do is convert e and format to ECMAScript style expressions.

ECMA Script regex is a subset of Perl regex, if I don't use the features exclusive to Perl regex.
Is it possible to find a general way to convert all Perl regular expressions to
C++
ECMAScript 
style?
Are there some tools to do this?

Any help will be appreciated!
Questionexception caused by reference to certain Windows functions Pin
ed welch24-Aug-12 6:12
ed welch24-Aug-12 6:12 

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.