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, work make library management system visual basic, virtuacloud captcha work make account, scope work make banner ads, is and work statistics, essay words climatic change, dataentry work office captcha words ahmedabad, css web work make web pages, busy work make money, willing work shift 500 words, perl regex replace html

Acerca do Empregador:
( 11 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