Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8952849
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T13:57:53+00:00 2026-06-15T13:57:53+00:00

I ran this simple program: #include <iostream> #include <string> using namespace std; #include <boost/regex.hpp>

  • 0

I ran this simple program:

#include <iostream>
#include <string>
using namespace std;

#include <boost/regex.hpp>

int main ()
{

//    boost::regex fullname_regex ("[A–Z]+[a–z]*, [A-Z][a–z]*");
boost::regex fullname_regex ("[A-Z]+[a-z]*, [A-Z][a-z]*");

string name;
cout << "Enter you full name: " << flush;

getline (cin, name);
if (! regex_match (name, fullname_regex))
{
    cout << "Error: name not entered correctly" << endl;
}

return 0;
}

which I just copied from somewhere. When I uncomment the commented line (part of the original copy/paste) and comment the next one (typed by myself) the program always rejects the name. Otherwise it works as expected. I am using vim. I did :set list to see hidden characters and the lines are identical. I inserted a long comment before the original line in order to move it down, suspecting a disk fault (very old system), but still I got the same error. This is an ubuntu server with no gui, I use putty to do this. I am not accustomed with such problems under linux, if anybody has any idea about what could explain this strange behaviour, please let me know. Maybe vim still uses some options from the original page, which is here and is formatted, indeed, but :set list does not show them?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T13:57:54+00:00Added an answer on June 15, 2026 at 1:57 pm

    That - character in the commented out line is U+2013 EN DASH, not the ASCII dash U+002d.

    Because of the limited bitmap font I’m using, the Unicode character already stuck out when opening the file, but you can use the g8 command to print the UTF-8 encoding values of the character under the cursor, or use :call search('[^\x00-\x7F]') to locate the next non-ASCII character.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am running a very simple C++ program: #include <list> #include <vector> int main(int
Here is the code: #include <iostream> #include <string> #include <map> #include <stdexcept> #include <boost/ptr_container/ptr_vector.hpp>
I ran this simple program, but when I convert from int to double ,
Possible Duplicate: Pygame programs hanging on exit Ran this simple program: import pygame, sys
I'm trying to include C code into a simple C++ program but I ran
I ran this persons code. It worked as a main but when i put
I wrote a c++ program using boost library in Xcode. Here is my code.
I wrote a simple program(calculating the number of steps for the numbers 1-10^10 using
I ran this query in my database : SELECT DB_NAME(dbid) as DBName, COUNT(dbid) as
I ran this sql query in my database: update payments set method = 'paysafecard'

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.