original_string: private function extractFromString($part, $number)
      {
          preg_match('/^[\{\[]([^\[\]\{\}]*)[\}\]](.*)/s', $part, $matches);
  
          if (count($matches) !== 3) {
              return;
          }
  
          $condition = $matches[1];
  
          $value = $matches[2];
  
          if (Str::contains($condition, ',')) {
              [$from, $to] = explode(',', $condition, 2);
  
              if ($to === '*' && $number >= $from) {
                  return $value;
              } elseif ($from === '*' && $number <= $to) {
                  return $value;
              } elseif ($number >= $from && $number <= $to) {
                  return $value;
              }
          }
  
          return $condition == $number ? $value : null;
      }
code: private function extractFromString($part, $number)
      {
          preg_match('/^[\{\[]([^\[\]\{\}]*)[\}\]](.*)/s', $part, $matches);
  
          if (count($matches) !== 3) {
              return;
          }
  
          $condition = $matches[1];
  
          $value = $matches[2];
  
          if (Str::contains($condition, ',')) {
              [$from, $to] = explode(',', $condition, 2);
  
              if ($to === '*' && $number >= $from) {
                  return $value;
              } elseif ($from === '*' && $number <= $to) {
                  return $value;
              } elseif ($number >= $from && $number <= $to) {
                  return $value;
              }
          }
  
          return $condition == $number ? $value : null;
      }
code_tokens: private function extractFromString ( $ part , $ number ) { preg_match ( '/^[\{\[]([^\[\]\{\}]*)[\}\]](.*)/s' , $ part , $ matches ) ; if ( count ( $ matches ) !== 3 ) { return ; } $ condition = $ matches [ 1 ] ; $ value = $ matches [ 2 ] ; if ( Str :: contains ( $ condition , ',' ) ) { [ $ from , $ to ] = explode ( ',' , $ condition , 2 ) ; if ( $ to === '*' && $ number >= $ from ) { return $ value ; } elseif ( $ from === '*' && $ number <= $ to ) { return $ value ; } elseif ( $ number >= $ from && $ number <= $ to ) { return $ value ; } } return $ condition == $ number ? $ value : null ; }
docstring: Get the translation string if the condition matches.
  
  @param  string  $part
  @param  int  $number
  @return mixed
docstring_tokens: Get the translation string if the condition matches .