drupal_match_path() for multiple wildcard patterns? I want to add some CSS and JS to multiple matched wildcard URL patterns. According to Add javascript to multiple specific urls, I can use a wildcard using drupal_match_path() and that works well for one pattern. However, I am trying to use a few patterns to add the same JS and CSS. So far I've tried these:

  // By path matching wildcard patterns.
  $path = drupal_get_path_alias();
  $pattern = 'portfolio/* || photo-blog';


and

  $path = drupal_get_path_alias();
  $pattern = 'portfolio/*, photo-blog';


and 

  $pattern = 'portfolio/*' 'photo-blog';
  $path = drupal_get_path_alias();


... but none of these work. I am guessing it may not be possible in the context of: 

if (drupal_match_path($path, $pattern)) {
// add JS and CSS based on above
  }
The API page you've linked describes the format of the $patterns argument:


  $patterns: String containing a set of patterns separated by \n, \r or
  \r\n.


These are types of carriage returns, in different Operating Systems.

Sooo .... did you try:

 $pattern = "portfolio/*\nphoto-blog";
 // or
 $pattern = "portfolio/*\rphoto-blog";
 // or
 $pattern = "portfolio/*\r\nphoto-blog";


EDIT:

 // for platform portability heh
 $pattern = "portfolio/*" . PHP_EOL . "photo-blog";