Didn't see this one before I hit 'Send'.
-Original Message-
From: John W. Krahn [mailto:[EMAIL PROTECTED]
Sent: Friday, August 25, 2006 6:28 PM
To: Perl Beginners
Subject: Re: Using a regular expression to remove all except
certaincharacters.
John W. Krahn wrote:
Or remove the /d
Comments below.
-Original Message-
From: John W. Krahn [mailto:[EMAIL PROTECTED]
Sent: Friday, August 25, 2006 6:25 PM
To: Perl Beginners
Subject: Re: Using a regular expression to remove all except
certaincharacters.
Dr.Ruud wrote:
>>
>> You might actually be looking for this:
>>
>>
Hello,
we are trying to setup an remote system to obtain account data records for our
client, which can be exported out as HTML or CSV file. The problem is after the
script remotely logs in, clickbank system sets a encrypted cookie called 'token'
for secure connections only.
we pass the init
Mumia W. wrote:
> On 08/25/2006 04:26 PM, Jim Schueckler wrote:
>> Hi,
>> I need to remove all characters from a string except 'a'..'z', 'A'..'Z',
>> and '0'..'9'.
>> [...]
>
> $newstring = $oldstring;
> $newstring =~ s/[^[:alnum:]]+//g;
>
> Everything that's not alphanumeric gets zapped to nothi
John W. Krahn wrote:
> Dr.Ruud wrote:
>>Jim Schueckler schreef:
>>
>>>I need to remove all characters from a string except 'a'..'z',
>>>'A'..'Z', and '0'..'9'.
>>>
>>>Could somebody please tell me the magicWords for:
>>> $newstring = magicWords($oldstring);???
>>>
>>>I am absolutely new to Per
Dr.Ruud wrote:
> Jim Schueckler schreef:
>
>>I need to remove all characters from a string except 'a'..'z',
>>'A'..'Z', and '0'..'9'.
>>
>>Could somebody please tell me the magicWords for:
>> $newstring = magicWords($oldstring);???
>>
>>I am absolutely new to Perl and regular expressions, so
On 08/25/2006 04:26 PM, Jim Schueckler wrote:
Hi,
I need to remove all characters from a string except 'a'..'z', 'A'..'Z',
and '0'..'9'.
[...]
$newstring = $oldstring;
$newstring =~ s/[^[:alnum:]]+//g;
Everything that's not alphanumeric gets zapped to nothing.
HTH
--
To unsubscribe, e-mail
Jim Schueckler schreef:
> I need to remove all characters from a string except 'a'..'z',
> 'A'..'Z', and '0'..'9'.
>
> Could somebody please tell me the magicWords for:
>$newstring = magicWords($oldstring);???
>
> I am absolutely new to Perl and regular expressions, so please don't
> assum
hello dear Perl-addicted,
to admit - i am a Perl-novice and ihave not so much experience in perl. But i
am willing to learn. i want to learn perl. As for now i have to solve some
tasks for the college. I have to do some investigations on a board where i have
no access to the db.
first of -
Alan Sanders schreef:
> defined ($smtp->auth($username, $password))
> or die "Can't authenticate: $!\n";
>
> $smtp->auth($username, $password);
Why twice?
--
Affijn, Ruud
"Gewoon is een tijger."
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTEC
On 8/25/06, Alan Sanders <[EMAIL PROTECTED]> wrote:
my $mail_server = "mailhost";
my $username = "login";
my $password = "password";
I hope you're using the real values when you run your code for real.
my $smtp = Net::SMTP->new($mail_server, Hello => 'mailhost', Port => 587, Timeout
=> 60,
Hey,
I'm trying to send mail over my server (1and1.com). They require smtp
authentication in order to send. I'm using windows XP.
Here is my code:
#!/usr/bin/perl -w
use strict;
use Net::SMTP;
my $mail_server = "mailhost";
my $username = "login";
my $password = "password";
my $msg = "This is
On 8/25/06, John W. Krahn <[EMAIL PROTECTED]> wrote:
See the link in my post for the "bug" report I already filed on this.
Ah, I see that it's been fixed (or at least documented). Thanks.
--Tom Phoenix
Stonehenge Perl Training
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional comma
Jim Schueckler wrote:
> Hi,
Hello,
> I need to remove all characters from a string except 'a'..'z', 'A'..'Z',
> and '0'..'9'.
>
> Could somebody please tell me the magicWords for:
> $newstring = magicWords($oldstring);???
>
> I am absolutely new to Perl and regular expressions, so please
How about this?
#Substitute any character that is not one of the ones in
#our character class with nothing
$newstring =~ s/[^a-zA-Z0-9]//g;
Note the '^' at the start of the character class. In a character class
it means "not", as in "not these characters". If you see it at the
start
Hi,
I need to remove all characters from a string except 'a'..'z', 'A'..'Z',
and '0'..'9'.
Could somebody please tell me the magicWords for:
$newstring = magicWords($oldstring);???
I am absolutely new to Perl and regular expressions, so please don't
assume I know anything that everybody el
On 08/25/2006 02:58 PM, Michael Weber wrote:
Greetings, perlers!
Greetings, Michael.
[...]
# Now that we're done, redirect the user to an "all done" page...
print "Location:
file:///Y:/Public_Info/IS/whitelist_done.html\r\n\r\n";
You can only redirect to web-servers. Redirection to locat
Moon, John wrote:
> I have the follows code
> perl -e '
> @a=(q{a...x name=taga_1 #...d name=tagb_1 f...r name=tagc_1 xxnn},
> q{h...e name=taga_4 t...g name=tagb_4 k name=tagc_4 nn});
> $ndx = 0;
> foreach $ln (@a) {
> print "b4 = $ln\n";
> $ln =~s/(name=.*)\d+/\1$ndx/g;
You should u
Tom Phoenix wrote:
> On 8/25/06, Robert Citek <[EMAIL PROTECTED]> wrote:
>
>> $ echo 'a: b' | perl -F'/: /' -lane 'print join("--", @F)'
>> a: b
>
> For some reason, the space character seems not to match a space
> character. I'd call it a bug. Other ways to match a space, like \s and
> \x20, all
"Moon, John" <[EMAIL PROTECTED]> writes:
> I have the follows code
> perl -e '
> @a=(q{a...x name=taga_1 #...d name=tagb_1 f...r name=tagc_1 xxnn},
> q{h...e name=taga_4 t...g name=tagb_4 k name=tagc_4 nn});
> $ndx = 0;
> foreach $ln (@a) {
> print "b4 = $ln\n";
> $ln =~s/(name=.*)\d+
Robert Citek schreef:
> Why do these two commands not produce the same output?
>
> $ perl -le 'print join("--", split(/: /, "a: b"))'
> a--b
>
> $ echo 'a: b' | perl -F'/: /' -lane 'print join("--", @F)'
> a: b
>
> From reading 'perldoc perlrun' the -F option should behave just like
> the pattern
On 8/25/06, Robert Citek <[EMAIL PROTECTED]> wrote:
$ echo 'a: b' | perl -F'/: /' -lane 'print join("--", @F)'
a: b
For some reason, the space character seems not to match a space
character. I'd call it a bug. Other ways to match a space, like \s and
\x20, all seem to work:
echo 'a: b' | p
On Aug 25, 2006, at 3:30 PM, John W. Krahn wrote:
This is a "feature" :-) This thread may help explain:
http://groups.google.com/group/perl.perl5.porters/browse_frm/thread/
2eca0c52a1b299c4/f655bddfdbf2d0d6?
lnk=st&q=&rnum=1&hl=en#f655bddfdbf2d0d6
One way to do what you want:
$ echo 'a:
I have the follows code
perl -e '
@a=(q{a...x name=taga_1 #...d name=tagb_1 f...r name=tagc_1 xxnn},
q{h...e name=taga_4 t...g name=tagb_4 k name=tagc_4 nn});
$ndx = 0;
foreach $ln (@a) {
print "b4 = $ln\n";
$ln =~s/(name=.*)\d+/\1$ndx/g;
print "af = $ln\n";
$ndx++
Robert Citek wrote:
>
> Why do these two commands not produce the same output?
>
> $ perl -le 'print join("--", split(/: /, "a: b"))'
> a--b
>
> $ echo 'a: b' | perl -F'/: /' -lane 'print join("--", @F)'
> a: b
>
> From reading 'perldoc perlrun' the -F option should behave just like
> the patt
All,
I am trying to run logic that will copy/delete 3
versions of log.\d+ files to their respective
directories. Because there are so many directories, I
have built a hash table instead of using a bunch of
"if else conditions" with reg exps. My problem is it
is not returning the words_num trans
Greetings, perlers!
I am trying to create a web page on my intranet that grabs some user
input, and puts the results in a file for later parsing.
Everything works except the last line... sometimes.
What the user is supposed to see is a web page that says "Thank you".
Most users do.
Some will n
On Aug 25, 2006, at 2:43 PM, Robert Citek wrote:
Why do these two commands not produce the same output?
$ perl -le 'print join("--", split(/: /, "a: b"))'
a--b
$ echo 'a: b' | perl -F'/: /' -lane 'print join("--", @F)'
a: b
From reading 'perldoc perlrun' the -F option should behave just
lik
Why do these two commands not produce the same output?
$ perl -le 'print join("--", split(/: /, "a: b"))'
a--b
$ echo 'a: b' | perl -F'/: /' -lane 'print join("--", @F)'
a: b
From reading 'perldoc perlrun' the -F option should behave just like
the pattern to split. What am I missing?
Rega
Hi,
Anyone know of a good online reference/tutorial for perl/Tk,
especially in
area of layouts (pack/grid/?)? Can't seem to get things lined up as I'd
like.
Also, anyone know how to (easily) get a script to act more like a
pipe,
ie: like Unix cat, head, etc... What I would like to be able to
Many, many fixes have been done to docs in bleadperl (and some already
found their way to the more recent stable version - 5.8.8). A bug
report (even in docs) is more valuable when an accurate description of
how to reproduce the issue is given (and that includes knowing the
perl version you are us
31 matches
Mail list logo