want to change search algorithm in custom fields
For standard phone number fields, that is taken care of:


In Advanced Search, the help text shows "Punctuation and spaces are
ignored." Formatting entered in the search is ignored and the search is done on just the digits.
In Quick Search, enter just the digits of the phone number.


But your title mentions custom fields... Does that mean you have an alphanumeric custom field to store a phone number?  Instead of that, can you use the standard phone numbers with a different 'location'?  You can customise the list of locations at Administer &gt; Customize Data and Screens &gt; Dropdown Options &gt; Location Types