Thank you Agrouf!
Such Regular Expression solve my problem. Now, I've got the solution.
To get a local copy of wav file:
[code]
#!/bin/bash
# TODO:
# - Verify whether $1.wav already exists. Case yes play, otherwise wget.
# - Improve first sed Regular Expression for deleting \' char.
# getting a local copy of page
wget http://answers.com/$1 -O $1.html
# extracting wav audio URL
SOUND=$(cat $1.html | grep wav | sed "s/.*(\(.*\)).*/\1/g" | sed "s/'//g")
# saving a local copy
wget $SOUND -O $1.wav
# removing html
rm -f $1.html
# playing with a player
mplayer $1.wav
[\code]
I've also found another method (many thanks to a friend, Marcelo), which there's no need a local copy of the wav file:
Code:
#!/bin/bash
# getting a local copy of page
wget http://answers.com/$1 -O $1.html
# preparing mplayer input
SOUND=$(grep -o "playIt.*http.*wav" $1.html | sed "s/playIt('//")
# removing html
rm -f $1.html
# playing with a player
mplayer $SOUND
Best regards,
Lourenco