- .
(exp1 | exp2)* , . , .
(exp1 * (exp2 exp1*)*) . unroll-the-loop:
(expr1|expr2|...)*. , . - (a*)*.
, , . , , . :
normal* ( special normal* )*
, exp1 , , exp2 , . , , normal* .
"([^"\\]|\\.)*" regex "some text here": 35 :

"[^"\\]*(\\.[^"\\]*)*" 6 , .

, regex101.com , , , , , - .
JS benchmark.js:
var suite = new Benchmark.Suite();
Benchmark = window.Benchmark;
suite
.add('Regular RegExp test', function() {
'"some text here"'.match(/"([^"\\]|\\.)*"/);
})
.add('Unrolled RegExp test', function() {
'"some text here"'.match(/"[^"\\]*(\\.[^"\\]*)*"/);
})
.on('cycle', function(event) {
console.log(String(event.target));
})
.on('complete', function() {
console.log('Fastest is ' + this.filter('fastest').map('name'));
})
.run({ 'async': true });
<script src="https://cdnjs.cloudflare.com/ajax/libs/lodash.js/4.13.1/lodash.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/platform/1.3.1/platform.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/benchmark/2.1.0/benchmark.js"></script>
Hide result:
Regular RegExp test x 9,295,393 ops/sec ±0.69% (64 runs sampled)
Unrolled RegExp test x 12,176,227 ops/sec ±1.17% (64 runs sampled)
Fastest is Unrolled RegExp test
, , - PHP ( ~ 0.45 ~ 0.22).
. , .