regex matching exactly 10 digits



I am having an issue trying to match exactly 10 digits. I want to
append a '1' in front of 10 digit fax numbers. Numbers longer than 10
digits leave alone. I am using \d{10,10} match at least and at most 10
digits but it still appends a 1 to international numbers. I am missing
something but I am not sure what.

#strip out unneeded chars
$fax_num =~ s/[\s()-]//g;

#append 1 to 10 digit fax number
$fax_num =~ s/(\d{10,10})/1$1/;

.



Relevant Pages

  • Append truncates some text fields
    ... When I append a text field from a staging table to the master table, ... The field is not indexed in the staging table. ... field for all records in the staging table is exactly 9 digits. ...
    (microsoft.public.access.queries)
  • Re: Append truncates some text fields
    ... I would check the Format and Input Mask properties. ... The field is not indexed in the staging table. ... The append query is a straight append ... field for all records in the staging table is exactly 9 digits. ...
    (microsoft.public.access.queries)
  • numbers rounding up in table
    ... I have several tables that have numbers displaying 2 digits to the right of ... However, when I append these into a common table, all numbers ...
    (comp.databases.ms-access)
  • Re: How to manipulate a contents of file as record structures
    ... and append the sum of digits at the end. ... Gabriel Genellina ...
    (comp.lang.python)
  • Different destination fields
    ... I've got 2 fields in my database that represent Easting and Northings. ... to the way the client's db is set up, I need to append each of these values ... UTM's are the full 6/7 digits while Grid coordinates are usually 3 digits ...
    (microsoft.public.access.queries)