Nieuws:

Ubuntu-NL weer online!

Na een periode van technische problemen en een overbelaste server zijn we eindelijk weer bereikbaar.
Samen met Hobbynet, onze sponsor en hostingpartner, hebben we een oplossing gevonden zodat alles weer soepel draait.

Bedankt voor jullie geduld en begrip. We hopen nu weer verder te gaan waar we gebleven waren.

Het team van Ubuntu-NL

Welkom, Gast. Alsjeblieft inloggen of registreren.
Heb je de activerings-mail niet ontvangen?

Auteur Topic: c++: regex flag voor speciale tekens gezocht.  (gelezen 2853 keer)

Offline bart85

  • Lid
c++: regex flag voor speciale tekens gezocht.
« Gepost op: 2018/03/09, 12:48:53 »
Ik heb onderstaande code in c++. Hoofdletters en kleine letters worden zo geaccepteerd. Het probleem is dat letters als ë è é à á ook goedgekeurd moeten worden. Op google heb ik al flink gezocht, maar ik kan geen flag vinden.

std::regex patt("^[[:alpha:]]*\t[[:alpha:]]*$")
Je leert maar mooi over weg gaan met de commandline.
Linus: "I'm happy with the people who are wandering around looking at the stars but I am looking at the ground and I want to fix the pothole before I fall in."
I look to the clouds behind me and see the thunder coming.

Offline bart85

  • Lid
Re: c++: regex flag voor speciale tekens gezocht.
« Reactie #1 Gepost op: 2018/03/09, 13:14:00 »
Ik heb http://www.regular-expressions.info/unicode.html gevonden, maar het werkt niet.
Je leert maar mooi over weg gaan met de commandline.
Linus: "I'm happy with the people who are wandering around looking at the stars but I am looking at the ground and I want to fix the pothole before I fall in."
I look to the clouds behind me and see the thunder coming.

Offline bart85

  • Lid
Re: c++: regex flag voor speciale tekens gezocht.
« Reactie #2 Gepost op: 2018/03/09, 16:19:09 »
[[:alpha:]] maar vervangen door .* maar is niet juist. Ook 3 tabs levert een match op.
« Laatst bewerkt op: 2018/03/09, 16:52:45 door bartveurink »
Je leert maar mooi over weg gaan met de commandline.
Linus: "I'm happy with the people who are wandering around looking at the stars but I am looking at the ground and I want to fix the pothole before I fall in."
I look to the clouds behind me and see the thunder coming.

Re: c++: regex flag voor speciale tekens gezocht.
« Reactie #3 Gepost op: 2018/03/09, 22:22:38 »
Ha Bart, dit soort vragen is nogal specialistisch. Ik geef je meer kans om sneller geholpen te worden wanneer je een C++-forum bezoekt (doorgaans Engelstalig).

Offline Bloom

  • Lid
Re: c++: regex flag voor speciale tekens gezocht.
« Reactie #4 Gepost op: 2018/03/10, 15:56:46 »
Probeer dit patroon eens: /^[a-zA-Z\u00C0-\u017F]+,\s[a-zA-Z\u00C0-\u017F]+$/Dit omvat alle Latijnse letters plus de letters met accenten uit Unicode.