Unformatted text preview: Find all lines that contain a real number containing one or more digits before and after the decimal point. 9. Write a regular expression which matches lines which contain only digits, and whose length is >= 1. Create a small file to test your expression using egrep . egrep -n ^[0-9]+[^A-Za-z] hw4problem9Test 10. Modify your regular expression from problem 9 to match lines which contain only digits which represent a floating point number, such as +123.456, or -23.445. The leading + or – signs may or may not be present, but there must be at least one digit before the decimal point and at least one digit after the decimal point. Create a small file to text your expression on using egrep . Rakocy 5/8/2011 1:02 a5/p5 Page 1 of 1...
View Full Document
- Spring '11
- Numerical digit, Decimal, egrep -n pattern, decimal point. egrep