Removing the dash/hyphen character from site search queries I use Custom Search module 7.x dev.

When my visitors put a dash/hyphen into search keywords, Drupal can't find the results.  

For example if they search for Station1 Station2, everything is OK, but if the keywords are Station1-Station2 nothing can be found as result.
(Putting a "dash" makes sense for my visitors because they want to search for timetables from Station1 to Station2.)

String Overrides removes characters but I suppose that module doesn't solve this issue.

What solution can I adopt?
You can probably do it with hook_form_alter() and str_replace(). I'm not familiar with the Custom Search module, but seems like it's just altering Drupal's default search so you could make use of this:

function mymodule_form_alter(&amp;$form, &amp;$form_state, $form_id) {
  switch ($form_id) {
    case 'search_form':
    case 'search_block_form':
      array_unshift($form['#validate'], 'mymodule_search_validation');
      break;
  }
}

function mymodule_search_validation($form, &amp;$form_state) {
  if (isset($form_state['values']['keys'])) {
    $form_state['values']['keys'] = str_replace('-', ' ', $form_state['values']['keys']);
  }
  elseif (isset($form_state['values']['search_block_form'])) {
    $form_state['values']['search_block_form'] = str_replace('-', ' ', $form_state['values']['search_block_form']);
  }
}


The above code adds a custom validation function to the search and search block forms where any existing dashes will be replaced by a space. The reason for using array_unshift() and the form validation handler is to replace values early on for avoiding potential issues that could arise at later stages.