$include_dir="/home/hyper-archives/boost-users/include"; include("$include_dir/msg-header.inc") ?>
Subject: Re: [Boost-users] [Regex] Group of number at line end
From: John Maddock (john_at_[hidden])
Date: 2009-09-23 12:44:48
> i am looking for a regular expression which extracts a group of number
> from
> the end of a line like the following:
>
> "This line may contain digits (9) but ends with numbers like 1 2 3 4 5"
>
> When using a regex like "^(.+)(\\s+(\\d+))+$" I receive
> "This line may contain digits (9) but ends with numbers like 1 2 3 4" and
> "5".
>
> Can someone help me?
What about: "^(.+)[^\\d\\s](\\s+\\d+)+$"
HTH, John.