M
M
ML2016-06-06 18:58:41
PHP
ML, 2016-06-06 18:58:41

Regular expressions search per turn?

//-->
'aabbaa'.replace( /^(a+)/, 'b' );

//<--
//Есть какой нибудь квантификатор или флаг?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
#
#algooptimize #bottize, 2016-06-06
@staffID

reverse replace reverse

A
Alexey, 2016-06-06
@alsopub

I will offer for a change:
'aabbaa'.replace( /(a+)$/, 'b' );

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question