CGI/Perl Guide
|
Learning Center
|
Forums
|
Advertise
|
Login
Site Search:
in
Perl Guide
PerlGuru Forums
Learning Ctr
MAIN
INDEX
SEARCH
POSTS
WHO'S
ONLINE
LOG
IN
Home
:
Perl Programming Help
:
Beginner
:
some regular expressions...
Print Thread
yaniv_av
Novice
Nov 3, 2002, 10:33 AM
Post #1 of 4 (186 views)
some regular expressions...
Can't Post
How can I combine those 2 operations into one substitute operation:
$file=~s/ {2,}/ /g;
$file=~s/[^a-zA-Z<>\/ ]//g;
Paul
Enthusiast
Nov 3, 2002, 10:41 AM
Post #2 of 4 (182 views)
Re: [yaniv_av] some regular expressions...
[
In reply to
]
Can't Post
You can't because one it substituting with a space and the other with nothing.
yaniv_av
Novice
Nov 3, 2002, 12:15 PM
Post #3 of 4 (180 views)
Re: [RedRum] some regular expressions...
[
In reply to
]
Can't Post
And suppose the replacment was the same ? like nothing in both cases ?
Paul
Enthusiast
Nov 3, 2002, 12:20 PM
Post #4 of 4 (178 views)
Re: [yaniv_av] some regular expressions...
[
In reply to
]
Can't Post
Code
$file =~ s#\s\s+|[^a-z<>/]+##ig;
Announcements
PerlGuru Announcements
Perl Programming Help
Frequently Asked Questions
Beginner
Intermediate
Advanced
Regular Expressions
mod_perl
DBI
Win32 Programming Help
Fun With Perl
Perl Quizzes - Learn Perl the Fun Way
Perl Golf
Perl Poetry
Need a Custom or Prewritten Perl Program?
I need a program that...
I Need a Programmer for Freelance Work
Throw Down The Gauntlet
General Discussions
General Questions
Feedback
Tutorial/Article Suggestions for The Learning Cent
Internet Security
Other Programming Languages
Javascript
PHP
Search
this forum
this category
all forums
for
All words
Any words
Whole Phrase
(
options
)
Powered by
Gossamer Forum v.1.2.0
Web Applications
&
Managed Hosting
Powered by Gossamer Threads
Visit our
Mailing List Archives