I have a variable which contains email addresses.
Examples:
$email[1]="email(at)test.com";
$email[2]="email[at]test.com";
$email[3]="email(a)test.com";
$email[4]="email(alfa)test.com";
$email[5]="email[a]test.com";
How can I to perform in PHP a regex find all between () and [] and replace with "@". so in the end it will be like this:
$email[1]="email@test.com";
$email[2]="email@test.com";
$email[3]="email@test.com";
$email[4]="email@test.com";
$email[5]="email@test.com";
All i have at the moment is this ((([a-zA-Z]+))|([[a-zA-Z]+]))