I have the following piece of code:
nonce = data.scan(/nonce="(.*)"/)
data is a string ,the matched piece of string is assigend to nonce variable which automatically becomes an Array.
Now, if i
puts nonce[0]
I will get my value printed correctly:
51d8852d
but if use:
puts "final string #{md1}:#{nonce[0]}:#{md2}"
the output will be:
df49f55acfd9d21837fd840644f251b4:["51d8852d"]:3b7718806908d2a4456086be7daba94ccd36ea19fd2bfa80ae41fa8be23433b7
but there shouldn't be any brackets or duoble quotes, i should get only the array's value. It should be something like this:
df49f55acfd9d21837fd840644f251b4:51d8852d:3b7718806908d2a4456086be7daba94ccd36ea19fd2bfa80ae41fa8be23433b7
Could you please suggest me how to solve this issue? Thanks
Dawid