I dont know the exact format for US-Fax numbers, but in germany it is common to write it in more than one "fashion".
e.g. 040-1234567, 040/1234567, or the international version which applies for you too (there the "0" from 040 is removed) ?: +49401234567.
Maybe this is similar for US? First thing would be to see what are common, allowed forms of the fax-number then build the regex i would suggest.
Update: People might even write it like these: 040/1234-67 or 0 40/ 12 34 67 ... So i think it could be (like others mentioned) getting complex to match all these, maybe some "simple form" could only check for allowed signs (-, /, whitespace , +, digits ...) so that no letters are used at least?

hth MH

In reply to Re: Regular expression for Fax numbers by matze77
in thread Regular expression for Fax numbers by dxxd116

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.