in reply to Re: Regex to match between [ref] and [/ref]
in thread Regex to match between [ref] and [/ref]

Hi,

Another question :)

I'm now trying:

    $message =~ s{\[(ref|note|réf)\](.*?)\[/(ref|note|réf)\]}{add_sup_note2($2)}ge;

...so it will work with:

[ref]something[/ref] [note]something[/note] [réf]something[/réf]


..but this one refuses to work :/

[réf]something[/réf]

Any ideas?

TIA

Andy

Replies are listed 'Best First'.
Re^3: Regex to match between [ref] and [/ref]
by ultranerds (Hermit) on Jul 17, 2009 at 13:31 UTC
    Duh, nevermind - got it working. When I was testing, I had

    [réf]something[réf]

    ..instead of:

    [réf]something[/réf]

    Doh!