🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: pl.comp.lang.c
Article #308577

Re: wyrażenia regularne - proszę o pomoc

#308577
From: bartekltg
Date: Thu, 19 May 2016 07:12
21 lines
1445 bytes
On 19.05.2016 09:06, zeus wrote:
> Mam coś takiego
>
> 133123bla-33233blabla
> 133123ffla-33233blaffbla
> itd....
>
> i chodzi mi o to aby cyfry zostały a resztę wyciąć.
> Mam problem z konstrukcją filtra = regex.
> Czasem mi działa a czasem nie,

A co napisałeś?

> ewentualnie może jakiś inny pomysł.

http://stackoverflow.com/questions/35282906/in-c-stl-how-do-i-remove-non-numeric-characters-from-stdstring-with-regex-r

sOutput = std::regex_replace(sInput, std::regex(R"([^0-9])"), "");

pzdr
bartekltg
Technical Details
Message-ID: <nhjp17$p1$1@node1.news.atman.pl>
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.icm.edu.pl!newsfeed2.atman.pl!newsfeed.atman.pl!.POSTED!not-for-mail
References: <nhjoln$ll6$1@sunflower.man.poznan.pl>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.icm.edu.pl!newsfeed2.atman.pl!newsfeed.atman.pl!.POSTED!not-for-mail
From: bartekltg <bartekltg@gmail.com>
Newsgroups: pl.comp.lang.c
Subject: Re: wyrażenia regularne - proszę o
 pomoc
Date: Thu, 19 May 2016 09:12:38 +0200
Organization: ATMAN - ATM S.A.
Lines: 22
Message-ID: <nhjp17$p1$1@node1.news.atman.pl>
References: <nhjoln$ll6$1@sunflower.man.poznan.pl>
NNTP-Posting-Host: 89-73-81-145.dynamic.chello.pl
Mime-Version: 1.0
X-Trace: node1.news.atman.pl 1463641959 801 89.73.81.145 (19 May 2016 07:12:39 GMT)
X-Complaints-To: usenet@atman.pl
NNTP-Posting-Date: Thu, 19 May 2016 07:12:39 +0000 (UTC)
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0
In-Reply-To: <nhjoln$ll6$1@sunflower.man.poznan.pl>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit