Click here to Skip to main content
15,845,273 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionNon-latin characters are shown correctly in Debug mode but not in Release Pin
sdancer754-Feb-20 4:34
sdancer754-Feb-20 4:34 
GeneralRe: Non-latin characters are shown correctly in Debug mode but not in Release Pin
Richard MacCutchan4-Feb-20 7:07
mveRichard MacCutchan4-Feb-20 7:07 
GeneralRe: Non-latin characters are shown correctly in Debug mode but not in Release Pin
sdancer754-Feb-20 7:24
sdancer754-Feb-20 7:24 
GeneralRe: Non-latin characters are shown correctly in Debug mode but not in Release Pin
Richard MacCutchan4-Feb-20 7:52
mveRichard MacCutchan4-Feb-20 7:52 
GeneralRe: Non-latin characters are shown correctly in Debug mode but not in Release Pin
sdancer754-Feb-20 21:48
sdancer754-Feb-20 21:48 
AnswerRe: Non-latin characters are shown correctly in Debug mode but not in Release Pin
Stefan_Lang5-Feb-20 22:41
Stefan_Lang5-Feb-20 22:41 
GeneralRe: Non-latin characters are shown correctly in Debug mode but not in Release Pin
sdancer756-Feb-20 0:12
sdancer756-Feb-20 0:12 
QuestionRegular expression confusion (std::regex_replace). Pin
Maximilien31-Jan-20 10:27
Maximilien31-Jan-20 10:27 
(the pre tag seems to be broken with the code)
const std::wstring expression( L"Value stored = $(_VARIABLE_NAME_)");
const std::wstring tmp(LR"(\$\(([^\(\)\$]*?)\))");
const std::wregex rx(tmp);
const std::wstring variableValue(L"A2347X$01GBFC");

std::match_results<std::wstring::const_iterator> matchResult;
const bool found = std::regex_search(expression, matchResult, rx);
if ( found )
{
    const std::wstring expressionOut = std::regex_replace(expression, rx, variableValue, std::regex_constants::format_first_only);
    std::wcout << "expressionOut  = " << expressionOut << "!\n";
}

When I run the above code (or use Regex Tester )

(I added the bold)
expressionOut = Value stored = A2347X_VARIABLE_NAME_GBFC

I was expecting (or I am wanting) the result to be

expressionOut = Value stored = A2347X$01GBFC

Is there a way to treat the input "A2347X$01GBFC" as a "raw" input and not something to be parsed by the std::regex_replace ?

In our case, the string "A2347X$01GBFC" is something that a user can input manually.

I'm certain there is an way to do it, but I cannot see it.

Thanks.
I'd rather be phishing!

AnswerRe: Regular expression confusion (std::regex_replace). Pin
k505431-Jan-20 11:17
mvek505431-Jan-20 11:17 
GeneralRe: Regular expression confusion (std::regex_replace). Pin
Maximilien31-Jan-20 13:21
Maximilien31-Jan-20 13:21 
GeneralRe: Regular expression confusion (std::regex_replace). Pin
Maximilien3-Feb-20 14:14
Maximilien3-Feb-20 14:14 
GeneralRe: Regular expression confusion (std::regex_replace). Pin
k50544-Feb-20 4:35
mvek50544-Feb-20 4:35 
AnswerRe: Regular expression confusion (std::regex_replace). Pin
Joe Woodbury31-Jan-20 12:58
professionalJoe Woodbury31-Jan-20 12:58 
GeneralRe: Regular expression confusion (std::regex_replace). Pin
Maximilien31-Jan-20 13:21
Maximilien31-Jan-20 13:21 
Questiongcov linker errors Pin
Vaclav_30-Jan-20 10:05
Vaclav_30-Jan-20 10:05 
AnswerRe: gcov linker errors Pin
Richard MacCutchan30-Jan-20 10:15
mveRichard MacCutchan30-Jan-20 10:15 
GeneralRe: gcov linker errors Pin
Vaclav_30-Jan-20 10:49
Vaclav_30-Jan-20 10:49 
GeneralRe: gcov linker errors Pin
Richard MacCutchan30-Jan-20 10:55
mveRichard MacCutchan30-Jan-20 10:55 
GeneralRe: gcov linker errors Pin
leon de boer30-Jan-20 22:43
leon de boer30-Jan-20 22:43 
GeneralRe: gcov linker errors Pin
Vaclav_31-Jan-20 6:32
Vaclav_31-Jan-20 6:32 
AnswerSOLVED Re: gcov linker errors Pin
Vaclav_30-Jan-20 11:30
Vaclav_30-Jan-20 11:30 
QuestionPNG image shown is missing 1 pixel right and 1 pixel bottom Pin
sdancer7530-Jan-20 3:53
sdancer7530-Jan-20 3:53 
QuestionRe: PNG image shown is missing 1 pixel right and 1 pixel bottom Pin
Richard MacCutchan30-Jan-20 7:29
mveRichard MacCutchan30-Jan-20 7:29 
AnswerRe: PNG image shown is missing 1 pixel right and 1 pixel bottom Pin
sdancer7530-Jan-20 7:53
sdancer7530-Jan-20 7:53 
QuestionIGNORE THIS !!! file not recognized: File format not recognized Pin
Vaclav_29-Jan-20 6:45
Vaclav_29-Jan-20 6:45 

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.