How do delete everything before an specific symbol? [duplicate]
Clash Royale CLAN TAG#URR8PPP
up vote
-1
down vote
favorite
This question already has an answer here:
Delete everything before â/â on every line
4 answers
I need to remove all numbers before "|" symbol. I tried some suggestions on a previous question (Delete everything before "/" on every line) but did not work for me.
For example:
113|gm1.1_g
115|gm1.3_g
350400|fgenesh1_kg.28251_#_1_#_remain_c2214
Then I would like to have:
gm1.1_g
gm1.3_g
fgenesh1_kg.28251_#_1_#_remain_c2214
Thanks
sed delete
marked as duplicate by John1024, Timothy Martin, Jeff Schaller, G-Man, Isaac Feb 9 at 2:23
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
add a comment |Â
up vote
-1
down vote
favorite
This question already has an answer here:
Delete everything before â/â on every line
4 answers
I need to remove all numbers before "|" symbol. I tried some suggestions on a previous question (Delete everything before "/" on every line) but did not work for me.
For example:
113|gm1.1_g
115|gm1.3_g
350400|fgenesh1_kg.28251_#_1_#_remain_c2214
Then I would like to have:
gm1.1_g
gm1.3_g
fgenesh1_kg.28251_#_1_#_remain_c2214
Thanks
sed delete
marked as duplicate by John1024, Timothy Martin, Jeff Schaller, G-Man, Isaac Feb 9 at 2:23
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
From the linked question, which methods did you try and in what way, precisely, did they not work for you?
â John1024
Feb 8 at 23:42
add a comment |Â
up vote
-1
down vote
favorite
up vote
-1
down vote
favorite
This question already has an answer here:
Delete everything before â/â on every line
4 answers
I need to remove all numbers before "|" symbol. I tried some suggestions on a previous question (Delete everything before "/" on every line) but did not work for me.
For example:
113|gm1.1_g
115|gm1.3_g
350400|fgenesh1_kg.28251_#_1_#_remain_c2214
Then I would like to have:
gm1.1_g
gm1.3_g
fgenesh1_kg.28251_#_1_#_remain_c2214
Thanks
sed delete
This question already has an answer here:
Delete everything before â/â on every line
4 answers
I need to remove all numbers before "|" symbol. I tried some suggestions on a previous question (Delete everything before "/" on every line) but did not work for me.
For example:
113|gm1.1_g
115|gm1.3_g
350400|fgenesh1_kg.28251_#_1_#_remain_c2214
Then I would like to have:
gm1.1_g
gm1.3_g
fgenesh1_kg.28251_#_1_#_remain_c2214
Thanks
This question already has an answer here:
Delete everything before â/â on every line
4 answers
sed delete
asked Feb 8 at 23:03
Paul
676
676
marked as duplicate by John1024, Timothy Martin, Jeff Schaller, G-Man, Isaac Feb 9 at 2:23
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
marked as duplicate by John1024, Timothy Martin, Jeff Schaller, G-Man, Isaac Feb 9 at 2:23
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
From the linked question, which methods did you try and in what way, precisely, did they not work for you?
â John1024
Feb 8 at 23:42
add a comment |Â
From the linked question, which methods did you try and in what way, precisely, did they not work for you?
â John1024
Feb 8 at 23:42
From the linked question, which methods did you try and in what way, precisely, did they not work for you?
â John1024
Feb 8 at 23:42
From the linked question, which methods did you try and in what way, precisely, did they not work for you?
â John1024
Feb 8 at 23:42
add a comment |Â
1 Answer
1
active
oldest
votes
up vote
1
down vote
accepted
The regex that mean "all numbers before |" (at the line start) is:
^[0-9]*|
Use that with sed:
$ echo "113|gm1.1_g" | sed 's/^[0-9]*|//'
gm1.1_g
Awk:
$ echo "113|gm1.1_g" | awk 'sub(/^[0-9]*|/,"")'
gm1.1_g
shell:
$ a="113|gm1.1_g"; r='^[0-9]*|(.*)$'; [[ $a =~ $r ]]; echo "$BASH_REMATCH[1]"
add a comment |Â
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
1
down vote
accepted
The regex that mean "all numbers before |" (at the line start) is:
^[0-9]*|
Use that with sed:
$ echo "113|gm1.1_g" | sed 's/^[0-9]*|//'
gm1.1_g
Awk:
$ echo "113|gm1.1_g" | awk 'sub(/^[0-9]*|/,"")'
gm1.1_g
shell:
$ a="113|gm1.1_g"; r='^[0-9]*|(.*)$'; [[ $a =~ $r ]]; echo "$BASH_REMATCH[1]"
add a comment |Â
up vote
1
down vote
accepted
The regex that mean "all numbers before |" (at the line start) is:
^[0-9]*|
Use that with sed:
$ echo "113|gm1.1_g" | sed 's/^[0-9]*|//'
gm1.1_g
Awk:
$ echo "113|gm1.1_g" | awk 'sub(/^[0-9]*|/,"")'
gm1.1_g
shell:
$ a="113|gm1.1_g"; r='^[0-9]*|(.*)$'; [[ $a =~ $r ]]; echo "$BASH_REMATCH[1]"
add a comment |Â
up vote
1
down vote
accepted
up vote
1
down vote
accepted
The regex that mean "all numbers before |" (at the line start) is:
^[0-9]*|
Use that with sed:
$ echo "113|gm1.1_g" | sed 's/^[0-9]*|//'
gm1.1_g
Awk:
$ echo "113|gm1.1_g" | awk 'sub(/^[0-9]*|/,"")'
gm1.1_g
shell:
$ a="113|gm1.1_g"; r='^[0-9]*|(.*)$'; [[ $a =~ $r ]]; echo "$BASH_REMATCH[1]"
The regex that mean "all numbers before |" (at the line start) is:
^[0-9]*|
Use that with sed:
$ echo "113|gm1.1_g" | sed 's/^[0-9]*|//'
gm1.1_g
Awk:
$ echo "113|gm1.1_g" | awk 'sub(/^[0-9]*|/,"")'
gm1.1_g
shell:
$ a="113|gm1.1_g"; r='^[0-9]*|(.*)$'; [[ $a =~ $r ]]; echo "$BASH_REMATCH[1]"
answered Feb 8 at 23:56
Isaac
6,6381734
6,6381734
add a comment |Â
add a comment |Â
From the linked question, which methods did you try and in what way, precisely, did they not work for you?
â John1024
Feb 8 at 23:42