search_string.gsub('*', '%')

gruß,
benny

Am 01.09.2010 um 10:47 schrieb Guido Pesch:

> Hallo,
> 
> wie ist der Regexp Ausdruck um alle Asterisk (*), egal an welcher Stelle 
> diese stehen, in ein % Zeichen umzuwandeln?
> 
> Beispiel:
> 
> *Ha*llo
> oder
> *Ha*llo*
> oder
> Ha*llo*
> 
> usw.
> 
> Meine Versuche scheitern.
> 
> search_string.sub(/^\*$/, '%') (geht nicht)
> 
> Danke
> 
> Guido
> 
> 
> _______________________________________________
> rubyonrails-ug mailing list
> rubyonrails-ug@headflash.com
> http://mailman.headflash.com/listinfo/rubyonrails-ug

_______________________________________________
rubyonrails-ug mailing list
rubyonrails-ug@headflash.com
http://mailman.headflash.com/listinfo/rubyonrails-ug

Antwort per Email an