Project

General

Profile

« Previous | Next » 

Revision 6be00883

Added by Andreas Kohlbecker about 12 years ago

fixing taxon short name function

View differences:

5.x/modules/cdm_dataportal/cdm_dataportal.module
1553 1553
     *       but only matching if no '(' or '.' in second word of name, ( \x2E = '.' )
1554 1554
     */
1555 1555
    $pattern = '/(^[a-zA-Z])([a-zA-Z]+)(\s+[^(\x2E]+\s+.+$)/';
1556
    if (preg_match($pattern, $string, $matches, PREG_OFFSET_CAPTURE)){
1556
    if (preg_match($pattern, $nameStr, $matches, PREG_OFFSET_CAPTURE)){
1557 1557
      return $matches[1][0] . "." . $matches[3][0] . "\n";
1558 1558
    }
1559 1559
  } else {

Also available in: Unified diff