regex - How to remove the first characters from strings? -


before :

c3a848415acf99bd656edb67fe6f4473 md5 : d7sanne1949 8c20ef279947aa107e6e8043a3cb0975 md5 : b0angela 1edd31297ccb89b719e998e11b0f14d1 md5 : 6dviv13 ed3fcef597fd4f33cd2785f31a992bcf md5 : 9barmagh98 2d078a00ce2cf322948d87be7cbe7979 md5 : 13tmart123 

after :

d7sanne1949 b0angela 6dviv13 9barmagh98 13tmart123 

how remove c3a848415acf99bd656edb67fe6f4473 md5 : , 8c20ef279947aa107e6e8043a3cb0975 md5 , etc ?

java examples for:

string s = "c3a848415acf99bd656edb67fe6f4473 md5 : d7sanne1949"; 
  • without regex:

    system.out.println(s.substring(39)); 

    or (according kent's comment):

    system.out.println(s.split(" ")[3]); 
  • using regex:

    system.out.println(s.replaceall(".* md5 : ", "")); 

    or

    system.out.println(s.replaceall("[0-9|a-f]+ md5 : ", "")); 

    or

    system.out.println(s.replaceall("[0-9|a-f]{32} md5 : ", "")); 

Comments

Popular posts from this blog

python - mat is not a numerical tuple : openCV error -

c# - MSAA finds controls UI Automation doesn't -

wordpress - .htaccess: RewriteRule: bad flag delimiters -