Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

RE: Regular Expression Help

by jlistf (Monk)
on Aug 11, 2000 at 20:40 UTC ( [id://27536]=note: print w/replies, xml ) Need Help??


in reply to Regular Expression Help

try:
if ($filename =~ m/^[A-Z]{5,}/) { $section_title = ($filename =~ s/:/:</B>\n<BR><BR>/); $filename = ""; }
the {5,} quantifier has to come after the [A-Z]. i also cleaned up the substitution regex a little.

jeff

Update: check out the other answers. they're better. thats what i get for posting too quickly, doh!

Replies are listed 'Best First'.
RE: RE: Regular Expression Help
by nardo (Friar) on Aug 11, 2000 at 20:54 UTC
    Also, the </B> should be <\/B>

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (7)
As of 2024-04-19 10:01 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found