CSE-3342 Perl解析
CSE-3342 Programming Languages: Perl
Assignment_5: Guess using Regular Expressions
100 pts
Due Date: 05 March, Tuesday, 2019
Write a program called guess (guess.pl) using regular expressions that try to guess what you entered. You may use your own choice of method(s) based on your approach (optional). The skeleton of the program is straight forward which is as follows:
It consists of an infinite loop that iterates until the last function is called.
If the user enters quit, then the program will exit otherwise your program applies several regular expressions to the user’s input to try to determine entered data.
If the input does not match any of the regular expressions, then program display a message indicating that “no match was found.”
Regular expressions should match input data which are listed below:
first name and last name: John Quincy Adams
The regular expression should determine the input data is male or female:
The regular expression should check the input data is street address: 5454 Amesbury Dr
The regular expression matches the city, state and zip code: Dallas, TX 75206
The regular expression should match the email address
The regular expression should match the phone number
The regular expression for currency
The regular expression for Monetary Input: $55.00 or $0.75, etc
The regular expression for debit or credit card number
The regular expression for date
The regular expression for time
The regular expression for URL
The regular expression for IP Address
【CSE-3342 Perl解析】You should follow the naming convention that is used for Perl programming. Program should include comments that explain each block of code or important statement.
Turn in to Canvas
1)Write the program in Perl, execute your program, capture output and submit a pdf file to Canvas
2)Execute all possible test cases and document your results in pdf against each regular expression for example, your regular expression should cover all possible date format or time format: 12 hr or 24 hr am, pm etc. same for different cards.
3)Submit: guess.pl file to Canvas
We will discuss this and few other assignments in this lecture session
推荐阅读
- Quartz|Quartz 源码解析(四) —— QuartzScheduler和Listener事件监听
- Java内存泄漏分析系列之二(jstack生成的Thread|Java内存泄漏分析系列之二:jstack生成的Thread Dump日志结构解析)
- [源码解析]|[源码解析] NVIDIA HugeCTR,GPU版本参数服务器---(3)
- Android系统启动之init.rc文件解析过程
- 小程序有哪些低成本获客手段——案例解析
- Spring源码解析_属性赋值
- Android下的IO库-Okio源码解析(一)|Android下的IO库-Okio源码解析(一) 入门
- 08_JVM学习笔记_类命名空间解析
- WebSocket|WebSocket 语法解析
- jvm|【JVM】JVM08(java内存模型解析[JMM])