regex help

2001-08-22 Thread Sergio Gonzalez
Can anyone tell me if i'm doing this right? #check for dangerous characters unless ($string =~ /^[\w .-\@:+?!]+$/) { print "ERROR, invalid characters used.! Character = $string"; exit; } thank you, Sergio Gonzalez -- To unsubscribe, e-mail: [EMAIL PROTECTED] For addition

Regex Help!

2004-03-21 Thread Sara
I am looking for a regex which would extract the intials from a string i.e. str = "Doe, John L.L.M"; $str =~ /(^(\w)).*?((\s)(\w)).*?((\s)(\w))/; $initial = $1.$2.$3; print "$initial"; The above code is not serving my purpose. String constants: There would be always 3 words (obvioulsy with 2

Regex Help.

2006-06-24 Thread Sara
Need help to remove EVERY thing (non-alphabets, symbols, ASCII codes etc) from a string except for a-zAZ, 0-9, dash and underscore. $string =~ s/?? Thanks, Sara.

Re: regex help

2001-08-22 Thread Jeffl
Well only you can be the judge if you are doing it right. But what that expression tells me is: $string matches, starting with either ( a word, a dot, a hyphen, a at sign, a colon, a plus sign, a question mark, a bang) one or more times, and ending in one of the afore mentioned. So if that is wh

Re: Regex Help!

2004-03-21 Thread Wiggins d'Anconia
Sara wrote: I am looking for a regex which would extract the intials from a string i.e. str = "Doe, John L.L.M"; $str =~ /(^(\w)).*?((\s)(\w)).*?((\s)(\w))/; $initial = $1.$2.$3; print "$initial"; The above code is not serving my purpose. String constants: There would be always 3 words (obviou

Re: Regex Help.

2006-06-24 Thread Mr. Shawn H. Corey
On Sun, 2006-25-06 at 00:14 +0500, Sara wrote: > Need help to remove EVERY thing (non-alphabets, symbols, ASCII codes etc) > from a string except for a-zAZ, 0-9, dash and underscore. > > $string =~ s/?? > > Thanks, > Sara. > By dash, I assume you mean ASCII character 0x2D. English version

RE: Regex Help.

2006-06-24 Thread Charles K. Clarkson
Sara wrote: : Need help to remove EVERY thing (non-alphabets, symbols, : ASCII codes etc) from a string except for a-zAZ, 0-9, : dash and underscore. : : $string =~ s/?? Read perlop: Quote and Quote-like Operators $string =~ tr/-_a-zA-Z0-9//cd; HTH, Charles K. Clarkson -- Mobile H

Re: Regex Help.

2006-06-24 Thread Lou Hernsen
To: Sent: Saturday, June 24, 2006 4:15 PM Subject: RE: Regex Help. > Sara wrote: > > : Need help to remove EVERY thing (non-alphabets, symbols, > : ASCII codes etc) from a string except for a-zAZ, 0-9, > : dash and underscore. > : > : $string =~ s/?? > > > Read

RE: Regex Help.

2006-06-25 Thread Charles K. Clarkson
Lou Hernsen wrote: : and if I want to include certain german umlutted vowels like : ö and ä i would add them like this? : $string =~ tr/-_a-zA-Z0-9öä//cd; : What happened when you tested it? : then what does this do? (from parsing SDTIN) : : $name =~ s/%([a-fA-F0-9][a-fA-F0-9])/pac

quick regex help plz.

2003-10-06 Thread Hotpop
I have input like this: HEADING1: This is the description lines. This is the description lines. This is the description lines. This is the description lines. HEADING2: This is the description lines. so and so... I have to format the HTML o

Extracting TD's from a Text File (Regex Help).

2008-04-08 Thread sara.samsara
TEXT FILE ## http://mysite.com/link/here_goes?id=239";>LINK   http://mysite.com/link/here_goes?id=239";>LINK 06/11/2007 12:29AM The text file contains hundreds of tds structure lik

Re: Extracting TD's from a Text File (Regex Help).

2008-04-08 Thread Wiggins d'Anconia
[EMAIL PROTECTED] wrote: > TEXT FILE ## > > > http://mysite.com/link/here_goes?id=239";>LINK > >   > > > http://mysite.com/link/here_goes?id=239";>LINK > width="150">06/11/2007 12:29AM > > > ##

Re: Extracting TD's from a Text File (Regex Help).

2008-04-08 Thread Gunnar Hjalmarsson
[EMAIL PROTECTED] wrote: All I need is to extract the td with class "PhorumTableRowAlt thread". pen(TXT, "links.txt") or die "Unable to open file"; my @links = ; close (TXT); foreach my $link(@links) { While the substring of interest spans over multiple lines, you are dealing with one lin

Re: Extracting TD's from a Text File (Regex Help).

2008-04-08 Thread Sean Davis
On Tue, Apr 8, 2008 at 8:22 AM, <[EMAIL PROTECTED]> wrote: > TEXT FILE ## > > > http://mysite.com/link/here_goes?id=239";>LINK > >   > > > http://mysite.com/link/here_goes?id=239";>LINK > width="150">06/11/2007 12:29AM > > > #