public static property Pinterest::$validationRegexp in Media entity Pinterest 8
List of validation regular expressions.
possible hostnames: www.pinterest.com, pinterest.com, jp.pinterest.com, pinterest.jp, pinterest.co.uk
Type: array
File
- src/
Plugin/ MediaEntity/ Type/ Pinterest.php, line 87
Class
- Provides media type plugin for Pinterest.
Namespace
Drupal\media_entity_pinterest\Plugin\MediaEntity\TypeCode
public static $validationRegexp = [
// Match PIN_URL_RE.
'@^\\s*(https?://)?(\\w+\\.)?pinterest\\.([a-zA-Z]+\\.)?([a-zA-Z]+)/pin/(?P<id>\\d+)/?\\s*$$@i' => 'id',
// Match BOARD_URL_RE.
'@^\\s*(https?://)?(\\w+\\.)?pinterest\\.([a-zA-Z]+\\.)?([a-zA-Z]+)/(?P<username>\\w+)/(?P<slug>[\\w\\-_\\~]+)/?\\s*$@iu' => 'board',
// Match BOARD_SECTION_URL_RE.
'@^\\s*(https?://)?(\\w+\\.)?pinterest\\.([a-zA-Z]+\\.)?([a-zA-Z]+)/(?P<username>\\w+)/(?P<slug>[\\w\\-_\\~]+)/(?P<section>[\\w\\-_\\~%]+)/?\\s*$@iu' => 'section',
// Match USER_URL_RE.
'@^\\s*(https?://)?(\\w+\\.)?pinterest\\.([a-zA-Z]+\\.)?([a-zA-Z]+)/(?P<username>\\w+)/?\\s*$@iu' => 'user',
];