in reply to Pattern Matching Problem

s!\@([^\@]*)\@!\@<B>$1</B>\@!g;

Abigail

Replies are listed 'Best First'.
Re: Re: Pattern Matching Problem
by allolex (Curate) on Aug 06, 2003 at 13:21 UTC
    Ok, so this one catches a string of any length (including zero), using *. The string can be any character except "@" [^\@]. The matching expression on the left captures the non-@ string and puts it into the variable $1, which is then put between bold tags. Abigail-II has used exclamation points here to improve legibility.

    --
    Allolex