CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Beginner:
Pattern to Match 2 newline chars

 



HTTP404
Deleted

Mar 11, 2001, 2:50 AM

Post #1 of 2 (81 views)
Pattern to Match 2 newline chars Can't Post

Pattern to Match 2 newline chars, i need to capture 2 presses of Enter key i tryed this

$line !~ /\s*/
$line !~ /\s{2}/
$line !~ /\n\n/
$line !~ /\s+/

but all these react only for 1 Enter key press




Jean
User


Mar 11, 2001, 3:08 AM

Post #2 of 2 (79 views)
Re: Pattern to Match 2 newline chars [In reply to] Can't Post

Usually, line will not include more than one \n.
In case user presses the Enter key twice, the first line will include only the first Enter. Second Enter must be captured either with additional line or some totally different way, like getc().

Jean Spector
QA Engineer @ Extent Technologies, Ltd.
mage@lycosmail.com

 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives