Click here to Skip to main content
15,886,664 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 3:34
sdancer754-Feb-20 3:34 
GeneralRe: Non-latin characters are shown correctly in Debug mode but not in Release Pin
Richard MacCutchan4-Feb-20 6:07
mveRichard MacCutchan4-Feb-20 6:07 
GeneralRe: Non-latin characters are shown correctly in Debug mode but not in Release Pin
sdancer754-Feb-20 6:24
sdancer754-Feb-20 6:24 
GeneralRe: Non-latin characters are shown correctly in Debug mode but not in Release Pin
Richard MacCutchan4-Feb-20 6:52
mveRichard MacCutchan4-Feb-20 6:52 
GeneralRe: Non-latin characters are shown correctly in Debug mode but not in Release Pin
sdancer754-Feb-20 20:48
sdancer754-Feb-20 20:48 
AnswerRe: Non-latin characters are shown correctly in Debug mode but not in Release Pin
Stefan_Lang5-Feb-20 21:41
Stefan_Lang5-Feb-20 21:41 
GeneralRe: Non-latin characters are shown correctly in Debug mode but not in Release Pin
sdancer755-Feb-20 23:12
sdancer755-Feb-20 23:12 
QuestionRegular expression confusion (std::regex_replace). Pin
Maximilien31-Jan-20 9:27
Maximilien31-Jan-20 9: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 10:17
mvek505431-Jan-20 10:17 
GeneralRe: Regular expression confusion (std::regex_replace). Pin
Maximilien31-Jan-20 12:21
Maximilien31-Jan-20 12:21 
GeneralRe: Regular expression confusion (std::regex_replace). Pin
Maximilien3-Feb-20 13:14
Maximilien3-Feb-20 13:14 
GeneralRe: Regular expression confusion (std::regex_replace). Pin
k50544-Feb-20 3:35
mvek50544-Feb-20 3:35 
AnswerRe: Regular expression confusion (std::regex_replace). Pin
Joe Woodbury31-Jan-20 11:58
professionalJoe Woodbury31-Jan-20 11:58 
GeneralRe: Regular expression confusion (std::regex_replace). Pin
Maximilien31-Jan-20 12:21
Maximilien31-Jan-20 12:21 
Questiongcov linker errors Pin
Vaclav_30-Jan-20 9:05
Vaclav_30-Jan-20 9:05 
AnswerRe: gcov linker errors Pin
Richard MacCutchan30-Jan-20 9:15
mveRichard MacCutchan30-Jan-20 9:15 
GeneralRe: gcov linker errors Pin
Vaclav_30-Jan-20 9:49
Vaclav_30-Jan-20 9:49 
GeneralRe: gcov linker errors Pin
Richard MacCutchan30-Jan-20 9:55
mveRichard MacCutchan30-Jan-20 9:55 
GeneralRe: gcov linker errors Pin
leon de boer30-Jan-20 21:43
leon de boer30-Jan-20 21:43 
GeneralRe: gcov linker errors Pin
Vaclav_31-Jan-20 5:32
Vaclav_31-Jan-20 5:32 
AnswerSOLVED Re: gcov linker errors Pin
Vaclav_30-Jan-20 10:30
Vaclav_30-Jan-20 10:30 
QuestionPNG image shown is missing 1 pixel right and 1 pixel bottom Pin
sdancer7530-Jan-20 2:53
sdancer7530-Jan-20 2:53 
QuestionRe: PNG image shown is missing 1 pixel right and 1 pixel bottom Pin
Richard MacCutchan30-Jan-20 6:29
mveRichard MacCutchan30-Jan-20 6:29 
AnswerRe: PNG image shown is missing 1 pixel right and 1 pixel bottom Pin
sdancer7530-Jan-20 6:53
sdancer7530-Jan-20 6:53 
QuestionIGNORE THIS !!! file not recognized: File format not recognized Pin
Vaclav_29-Jan-20 5:45
Vaclav_29-Jan-20 5: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.