Em Andamento

Help with regex

Change the two reg_replace to one... and make it so it can work for unlimited chords.. Is this even possible?

//change [C] [C] [C]words to two bar chords and one chord

$html = preg_replace("@\[(".CHORDS.")\] \[(".CHORDS.")\] \[(".CHORDS.")\]([\wæøåÆØÅäÄöÖé])@", "<span class='bar'>$1</span><span class='bar'>$10</span><span class='chord'>$19</span>$28",$html);

//change [C] [C]words to one bar chord and one chord

$html = preg_replace("@\[(".CHORDS.")\] \[(".CHORDS.")\]([\wæøåÆØÅäÄöÖé\(])@", "<span class='bar'>$1</span><span class='chord'>$10</span>$19",$html);

Habilidades: PHP

Ver mais: regex is, regex c, essay words climatic change, busy work make money, perl regex replace html

Acerca do Empregador:
( 10 comentários ) Stenlill, Denmark

ID do Projeto: #10497888

Premiar a:

dingyaosd

I'm not quite sure what you are achieving here, but You can use []+ to match 1 or more , or [](2,) that's 2 or more

$22 USD em 1 dia
(2 Avaliações)
0.0