Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: regex match word , don't match word preceeded by slash

by kcott (Archbishop)
on Nov 19, 2010 at 02:26 UTC ( [id://872407]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    $string =~ s{
                    (?<![-\w./])
    ...
                        \s?
                    )
                }{<b>$1<\/b>}gimsx;
    
  2. or download this
    $ regex_slash_prob.pl
    <a href="/cgi-programming-with-perl.zip"><b>cgi-programming-with-perl.
    +zip</b></a>
    
  3. or download this
    my $string = qq|
            <a href="/cgi-programming-with-perl.zip">
                cgi-programming-with-perl.zip
            </a>
    |;
    
  4. or download this
            <a href="/cgi-programming-with-perl.zip">
               <b> cgi-programming-with-perl.zip
    </b>        </a>
    
  5. or download this
            <a href="/cgi-programming-with-perl.zip">
                <b>cgi-programming-with-perl.zip</b>
            </a>
    
  6. or download this
    $string =~ s{
                    (?<![-\w./])
    ...
                        [-\w.]*
                    )
                }{<b>$1<\/b>}gimsx;
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://872407]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others browsing the Monastery: (7)
As of 2024-04-18 10:22 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found