Re: Regexp non-alphanumerics to spaces

2007-03-31 Thread Dr.Ruud
"John W. Krahn" schreef: > Dr.Ruud: >> John W. Krahn: >>> Rob Dixon: Grant: > Hello, can you guys show me how to convert each non-alphanumeric > character in a string to a space, and then convert any number of > consecutive spaces in the string to a single space? $text =

Re: Regexp non-alphanumerics to spaces

2007-03-30 Thread John W. Krahn
Dr.Ruud wrote: > "John W. Krahn" schreef: >>Rob Dixon: >>>Grant: > Hello, can you guys show me how to convert each non-alphanumeric character in a string to a space, and then convert any number of consecutive spaces in the string to a single space? >>>$text =~ s/[^[:alnum:]]/ /g; >>>$t

Re: Regexp non-alphanumerics to spaces

2007-03-30 Thread Dr.Ruud
"John W. Krahn" schreef: > Rob Dixon: >> Grant: >>> Hello, can you guys show me how to convert each non-alphanumeric >>> character in a string to a space, and then convert any number of >>> consecutive spaces in the string to a single space? >> >> $text =~ s/[^[:alnum:]]/ /g; >> $text =~ s/\s+/ /

Re: Regexp non-alphanumerics to spaces

2007-03-30 Thread John W. Krahn
Rob Dixon wrote: > Grant wrote: >> >> Hello, can you guys show me how to convert each non-alphanumeric >> character in a string to a space, and then convert any number of >> consecutive spaces in the string to a single space? >> >> If I need to specify exactly which characters I want converted to >

Re: Regexp non-alphanumerics to spaces

2007-03-30 Thread Grant
> Hello, can you guys show me how to convert each non-alphanumeric > character in a string to a space, and then convert any number of > consecutive spaces in the string to a single space? > > If I need to specify exactly which characters I want converted to > spaces, I'd be happy with just the "."

Re: Regexp non-alphanumerics to spaces

2007-03-30 Thread Rob Dixon
Grant wrote: Hello, can you guys show me how to convert each non-alphanumeric character in a string to a space, and then convert any number of consecutive spaces in the string to a single space? If I need to specify exactly which characters I want converted to spaces, I'd be happy with just the