<?php
namespace App\Utils\BaseParser\TextParser\Types; class InSet extends \App\Utils\BaseParser\TextParser\BlockRegexpAbstract { protected $extractRegexp = "/^(?P<rawData>__VALUE____LENGHTS__)/"; public function __construct($options = [], $parent = null) { $options['val_regex'] = sprintf("[%s]", implode("", array_map(function($v){ return preg_quote($v, "/"); }, $options['val']))); $options['val'] = null; parent::__construct($options, $parent); } } 