I am running Bitcoin in regtest mode. Is it possible to send bitcoins generated in regtest mode to a friend ? (I only want to test it). Is it possible ?
Yes, sort of.
In regtest mode, mining is made much easier, and by default it doesn't attempt to connect to any peers to exchange blocks or transactions. But your friend can run another client in regtest mode and explicitly connect to yours, and then you will share the same block chain and can exchange transactions.
You will need to ensure that your firewall allows incoming TCP port 18444 from the Internet (or at least from your friend's IP address). You'll also need your external IP address; say it is 18.104.22.168. (DNS also works if your machine has a DNS name.) Then you can run your client with
-regtest, and your friend can run hers with
-regtest -connect=22.214.171.124. Once you have synced your blockchain with each other, you can send transactions to each other just like you were on the real Bitcoin network. (Of course, nobody will see them except you.)
Note that in order for the transactions to be confirmed, one or both of you will have to use
setgenerate to mine some more blocks.
Note also that if both of you are mining, a temporary network failure could lead to you quickly making a big fork in your block chain. This will make the Bitcoin client unhappy.