/android/import-contacts

To get this branch, use:
bzr branch http://bzr.ed.am/android/import-contacts

« back to all changes in this revision

Viewing changes to src/org/waxworlds/edam/importcontacts/Importer.java

  • Committer: edam
  • Date: 2011-03-13 18:58:52 UTC
  • Revision ID: edam@waxworlds.org-20110313185852-s74kvkbv8k0v0lwc
- accept parameters that are quoted (this doesn't appear to be part of the standards AFAICT, but Evolution apparently quotes parameter values)

Show diffs side-by-side

added added

removed removed

648
648
        private String sanitisePhoneNumber( String number )
649
649
        {
650
650
                number = number.replaceAll( "[-\\(\\) ]", "" );
651
 
                Pattern p = Pattern.compile( "^\\+?[0-9]+" );
 
651
                Pattern p = Pattern.compile( "^[\\+0-9#*]+" );
652
652
                Matcher m = p.matcher( number );
653
653
                if( m.lookingAt() ) return m.group( 0 );
654
654
                return null;