on 6/10/03 10:33 AM, Dominik Werder at dwerder / gmx.net wrote:

> Hi all,
> 
> 
> I have a list of states and want to xtract only the names without "(12345)"
> Some states do have the paranethese with the number, some do not, like
> this:
> 
> Illinois (3762)
> Indiana
> Iowa (64)
> Kansas
> Kentucky (2675)
> 
> This is probably not the easiest way to solve this:
> file.gets=~/(.+?)( \(.+)?$/
> puts $1

file.gets =~ /([\w\s]+)/
puts $1