As I understand it, it is not the physical act of baptism itself constitutes regeneration, but the reality of what one's immersion in water represents. There is something happening within the heart and mind of the person which corresponds to the death and resurrection which the immersion depicts. As the person goes under the water, he dies to the self-life. When he emerges from the water, he is resurrected to a new life in Christ Jesus. Thus Justin Martyr declared that one's regeneration occurs as he is baptized.
When one buys a new car, he signs an agreement to clinch the deal. I see baptism as the agreement one signs with God to clinch his discipleship, his dying to self and becoming alive to Christ. Normally one's regeneration occurs simultaneously with his baptism, as well as the receiving of the Holy Spirit.
This is not to say that there are not exceptional cases. Sometimes it may not be possible to be baptized --- for example health conditions may not permit it. In such cases, a person could be regenerated without baptism.
There are also several situations in the book of Acts where regeneration and the receipt of the Holy Spirit were not simultaneous.
After that special day of Pentecost, certain people heard Peter speak, and were cut to the heart for having put to death their Lord and Messiah. They asked him, “ Brothers, what shall we do?” Since that time, every Jewish person who acted according to Peter’s words received the Holy Spirit. "Repent, and be baptized every one of you in the name of Jesus Christ for the forsaking of your sins; and you shall receive the gift of the Holy Spirit.” Notice the consequence of repenting and being baptized in Jesus’ name for the forsaking of their sins, was the receipt of a gift. That gift was the Holy Spirit.
Prior to that special day of Pentecost, the Spirit had not yet been given. So those baptized by John the Baptizer and Jesus didn’t receive the abiding Spirit.
One baptism of the Spirit; many infillings of the Spirit.
After his initial regeneration, a disciple may be filled with the HS over and over. He is filled in order to have the power of God in his life ---- power for service to the King. This infilling may be accompanied by tongues, a special flowing of love, special wisdom, discernment of spirits, faith, or any of the other gifts of the Spirit.
During the early days of Christianity, as in the events recorded in Acts, there were special peoples who did not receive the Spirit at the same time as their baptism into Christ. There were special reasons for this which do not apply today:
First notice that Jesus had told the disciples that after they received the Holy Spirit they would be His witnesses to the Jews, the Samaritans, and to the Gentiles. But the disciples were not prepared to go to the Samaritans and Gentiles yet ---- except Philip who went to the Samaritans.
Acts 1:8 But you shall receive power when the Holy Spirit has come upon you; and you shall be my witnesses in Jerusalem and in all Judea and Samaria and to the end of the earth."
Story #1
But when [the Samaritans] believed Philip as he preached good news about the kingdom of God and the name of Jesus Christ, they were baptized, both men and women. Even Simon himself believed, and after being baptized he continued with Philip. And seeing signs and great miracles performed, he was amazed. Now when the apostles at Jerusalem heard that Samaria had received the word of God, they sent to them Peter and John, who came down and prayed for them that they might receive the Holy Spirit; for it had not yet fallen on any of them, but they had only been baptized in the name of the Lord Jesus. Then they laid their hands on them and they received the Holy Spirit. Acts 8:12-17
Why did these Samaritan disciples not receive the Holy Spirit when they were baptized? The Jews had no dealing with the Samaritans. Philip proclaimed the gospel to them, and they repented and were baptized. But the Spirit had been given only to the Jews on that special day of Pentecost. When the apostles at Jerusalem heard about Samaria receiving the gospel, they sent Peter and John to investigate. God wanted to convince Peter and John they even Samaritans could become true disciples, and so He withheld the gift of the Holy Spirit from the Samaritans until Peter and John arrived, so that they could observe the Samaritan disciples receiving the gift.
Story #2
To him all the prophets bear witness that every one who believes in him receives freedom from sins through his name."
While Peter was still saying this, the Holy Spirit fell on all who heard the word. And the believers from among the circumcised who came with Peter were amazed, because the gift of the Holy Spirit had been poured out even on the Gentiles. For they heard them speaking in tongues and extolling God. Then Peter declared, "Can any one forbid water for baptizing these people who have received the Holy Spirit just as we have?" And he commanded them to be baptized in the name of Jesus Christ. Acts 10:43-48
Here is a case where people received the Spirit BEFORE they were baptized. Why? Because these were Gentiles. The Jewish disciples did not think God had anything to do with Gentiles. So Gentiles would never have been accepted for baptism and discipleship. So God performed a special miracle to convince the Jews that He would accept Gentiles as disciples. He poured out the Spirit upon them and they spoke in tongues and praised God. This convinced the Jews, and so they were then baptized in water.
Story #3
While Apollos was at Corinth, Paul passed through the upper country and came to Ephesus. There he found some disciples.
And he said to them, "Did you receive the Holy Spirit when you believed?"
And they said, "No, we have never even heard that there is a Holy Spirit."
And he said, "Into what then were you baptized?"
They said, "Into John’s baptism."
And Paul said, "John baptized with the baptism of repentance, telling the people to believe in the one who was to come after him, that is, Jesus."
On hearing this, they were baptized in the name of the Lord Jesus. And when Paul had laid his hands upon them, the Holy Spirit came on them; and they spoke with tongues and prophesied. There were about twelve of them in all. Acts 19:1-7
There people hadn’t received the Holy Spirit at their baptism because they were baptized by John the Baptizer, and the Holy Spirit had not yet been given at that time.
So God gave the gift of the Spirit to the Jews, the Samaritans, and the Gentiles at three different times --- and then to those who had been baptized before the day of Pentecost.
These were special situations when the Church was young. None of these conditions apply today