sed 的 regular expression - Linux

By Ivy
at 2013-08-23T23:49
at 2013-08-23T23:49
Table of Contents
bash-4.1.11 --> bash
akode-2.0.2_1 --> akode
ca_root_nss-3.12.11,1 --> ca_root_nss
我想把以上左邊變右邊,我會用 perl的 regular expression
^(.+)-(\d|\.|,|_)+ --> \1
這樣
但 sed 沒有 perl regexp,應該要怎麼用?
想把
-(數字 or . or , or _) 去掉
--
akode-2.0.2_1 --> akode
ca_root_nss-3.12.11,1 --> ca_root_nss
我想把以上左邊變右邊,我會用 perl的 regular expression
^(.+)-(\d|\.|,|_)+ --> \1
這樣
但 sed 沒有 perl regexp,應該要怎麼用?
想把
-(數字 or . or , or _) 去掉
--
Tags:
Linux
All Comments

By Lucy
at 2013-08-24T08:35
at 2013-08-24T08:35

By Hedwig
at 2013-08-25T08:37
at 2013-08-25T08:37

By Belly
at 2013-08-27T08:59
at 2013-08-27T08:59

By Victoria
at 2013-08-28T18:57
at 2013-08-28T18:57

By George
at 2013-09-01T21:53
at 2013-09-01T21:53

By Susan
at 2013-09-05T15:03
at 2013-09-05T15:03

By Daniel
at 2013-09-09T00:56
at 2013-09-09T00:56

By Ina
at 2013-09-13T11:15
at 2013-09-13T11:15

By Ula
at 2013-09-14T22:13
at 2013-09-14T22:13

By Michael
at 2013-09-15T07:22
at 2013-09-15T07:22
Related Posts
LMDE 5.1聲道如何啟用?

By Joseph
at 2013-08-23T20:05
at 2013-08-23T20:05
ubuntu12.04無法進入圖形介面

By Adele
at 2013-08-23T19:48
at 2013-08-23T19:48
須在server前面裝防火牆嗎?

By Jacob
at 2013-08-23T17:09
at 2013-08-23T17:09
PD Ubuntu 時間無法更改

By Dinah
at 2013-08-23T15:29
at 2013-08-23T15:29
ubuntu12.04無法進入圖形介面

By Rae
at 2013-08-23T15:29
at 2013-08-23T15:29