Retourner au contenu associé (entrée de forum : question regex)
Posté par Pascal Terjan le 27 janvier 2009 à 18:56. En réponse au message question regex. Évalué à 7.
AltStyle によって変換されたページ (->オリジナル) / アドレス: モード: デフォルト 音声ブラウザ ルビ付き 配色反転 文字拡大 モバイル
# Locale
Posté par Pascal Terjan . En réponse au message question regex. Évalué à 7.
En français (ou en anglais) c'est aAbBcC...zZ donc A-Z ca fait toutes les majuscules + toutes les minuscules sauf a
[pterjan@plop tmp]$ echo HELLObezbe | sed -r 's/^([A-Z]*).*$/1円/g'
HELLObezbe
[pterjan@plop tmp]$ echo HELLObeabe | sed -r 's/^([A-Z]*).*$/1円/g'
HELLObe
[pterjan@plop tmp]$ echo HELLObeabe | LC_ALL=C sed -r 's/^([A-Z]*).*$/1円/g'
HELLO
[pterjan@plop tmp]$ echo HELLObeabe | LC_ALL=en_US sed -r 's/^([A-Z]*).*$/1円/g'
HELLObe