... | ... |
@@ -102,11 +102,11 @@ sub massive_send_sms { |
102 | 102 |
$contact->{phone} =~ s/[\s\.]//g; |
103 | 103 |
$_ = $msg->{Content}; |
104 | 104 |
s/\@prénom/$contact->{firstname}/g; |
105 |
- if ($contact->{gender} eq 'F') { |
|
106 |
- s/\@\(\s*(\w+)\s*,\s*\w+\s*\)/$1/g; |
|
105 |
+ if ($contact->{gender} eq 'F') { # @(Féminin,Masculin) |
|
106 |
+ s/@\(([^,]+),[^\)]+\)/$1/g; |
|
107 | 107 |
} |
108 | 108 |
else { |
109 |
- s/\@\(\s*\w+\s*,\s*(\w+)\s*\)/$1/g; |
|
109 |
+ s/@\([^,]+,([^\)]+)\)/$1/g; |
|
110 | 110 |
} |
111 | 111 |
$outbox_sms_queue->enqueue([$contact->{phone}, $_]) |
112 | 112 |
} |