How do delete everything before an specific symbol? [duplicate]

Multi tool use
Multi tool use

The name of the pictureThe name of the pictureThe name of the pictureClash 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







share|improve this 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















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







share|improve this 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













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







share|improve this question













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









share|improve this question











share|improve this question




share|improve this question










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

















  • 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











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]"





share|improve this answer



























    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]"





    share|improve this answer
























      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]"





      share|improve this answer






















        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]"





        share|improve this answer












        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]"






        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Feb 8 at 23:56









        Isaac

        6,6381734




        6,6381734












            ijDjN,Y1K7Xk44JwFf4pnu4GsoI41N l4vWANE,9s 32XAVBFWLvf
            qxRR9 ghbXHMgA1U9xn3zZ4PI

            Popular posts from this blog

            How to check contact read email or not when send email to Individual?

            How many registers does an x86_64 CPU actually have?

            Displaying single band from multi-band raster using QGIS