From: Jeremy Davis <jeremyd@freeside.biz>
Date: Fri, 5 Sep 2014 16:03:38 +0000 (-0400)
Subject: #14049 fix regex
X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=commitdiff_plain;h=b13dda3c202b7eb07167e6423ee71c63f18cdac1

#14049 fix regex
---

diff --git a/FS/FS/part_export/nena2.pm b/FS/FS/part_export/nena2.pm
index 50f4b1695..e172a15a9 100644
--- a/FS/FS/part_export/nena2.pm
+++ b/FS/FS/part_export/nena2.pm
@@ -15,7 +15,7 @@ my %upload_targets;
 
 tie %options, 'Tie::IxHash', (
   'company_name'    => {  label => 'Company name for header record',
-                          type  => 'text'
+                          type  => 'text',
                        },
   'company_id'      => {  label => 'NENA company ID',
                           type  => 'text',
@@ -226,8 +226,8 @@ sub data {
   $hash{function_code} = $function_code{$action};
 
   # Add default area code if phonenum is 7 digits
-  if ($self->option('area_code') =~ /^\d{3}/ && $svc->phonenum =~ /^\d{7}/ ){
-  $svc->phonenum = $self->option('area_code'). $svc->phonenum
+  if ($self->option('area_code') =~ /^\d{3}$/ && $svc->phonenum =~ /^\d{7}$/ ){
+  $svc->phonenum = $self->option('area_code'). $svc->phonenum;
   }
  
   # phone number