Skip to content
Advertisement

extract hash digits from string

How can I extract only the hash digits in the quotations in various strings such as:

JavaScript

I need to extract the digits and insert into a table using this script:

JavaScript

So in the above example if the strings before the ‘=’ changes due to different hashes then I won’t be able to be consistent with my piece of code. Is there anyway to extract only the digits after ‘=’ inside the quotations for all type of hashes ? – e.g. 82d29b52e35e7938e7ee610c04ea9daaf5e08e90

Advertisement

Answer

You could split a string using ‘=’ as a delimiter. Something like this:

JavaScript

This code gives me the result:

JavaScript
User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement