To match an optional character or sequence, use the question mark quantifier (?).
package{ import flash.display.Sprite; public class Main extends Sprite{ public function Main(){ var betterPhoneNumber:RegExp = /\(?\d{3}\)?-?\d{3}-?\d{4}/; trace(betterPhoneNumber.test("(703)222-1234")); //true trace(betterPhoneNumber.test("310-222-1515")); //true trace(betterPhoneNumber.test("7242229090")); //true } } }