title: Format string to phone number with (123) 456-6789 pattern using dart
body: <p>Here is my code</p>
  
  <pre><code>void main() {
  
    String phoneNumber = '123456789';
  
    String formattedPhoneNumber = phoneNumber.replaceFirst("(\d{3})(\d{3})(\d+)", "(\$1) \$2-\$3");
  
    print('Formatted number ${formattedPhoneNumber}');
  
  }
  </code></pre>
  
  <p><strong>Output:</strong></p>
  
  <p>Formatted number 123456789</p>
  
  <p>I want output as Formatted number (123) 456-6789</p>