LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 02-17-2006, 01:54 PM   #1
PB0711
Member
 
Registered: Aug 2004
Location: London, UK
Distribution: Ubuntu 10.10, ubuntu 11.04, suse 9.2, OSX
Posts: 259

Rep: Reputation: 30
Smile Perl RE question


Hey just a quick one this time!

In Perl the regular expression
Code:
/\d+/
would that reconise a decimal point? So something like 233.5698? If it doesn't should I do
Code:
/\d+\.\d+/

Cheers,

PB
 
Old 02-17-2006, 10:22 PM   #2
spooon
Senior Member
 
Registered: Aug 2005
Posts: 1,755

Rep: Reputation: 51
Quote:
Originally Posted by PB0711
In Perl the regular expression
Code:
/\d+/
would that reconise a decimal point? So something like 233.5698?
No.

Quote:
Originally Posted by PB0711
If it doesn't should I do
Code:
/\d+\.\d+/
Sure, if it always has a decimal point with digits on both sides, with no negative signs or stuff like that.

Last edited by spooon; 02-17-2006 at 10:25 PM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
reinstall perl question.. (urpme perl) rjcrews Mandriva 2 01-28-2006 06:19 PM
a perl question thanhVic Programming 1 03-13-2005 02:45 AM
Hiding code in PERL, perl gui question randomx Programming 1 06-26-2004 03:22 PM
perl question eph Programming 4 04-04-2004 09:51 PM
perl(Cwd) perl(File::Basename) perl(File::Copy) perl(strict)....What are those? Baldorg Linux - Software 1 11-09-2003 08:09 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 06:08 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration