# Computer Programming 2 - PowerPoint PPT Presentation

Computer Programming 2

1 / 12
Computer Programming 2

## Computer Programming 2

- - - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - - -
##### Presentation Transcript

1. MINISTRY OF EDUCATION & HIGHER EDUCATION COLLEGE OF SCIENCE AND TECHNOLOGY (CST) KHANYOUNIS- PALESTINE Computer Programming 2 Lecture 7: String Processing Part d: Regular Expressions Prepared & Presented by: Mahmoud Rafeek Alfarra

2. و من يتقِ الله ... قال ابن مسعود رضي الله عنه في قوله تعالى : (( اتَّقُوا اللَّهَ حَقَّ تُقَاتِهِ وَلا تَمُوتُنَّ )) (آل عمران :102) قال : أن يطاع فلا يعصي ويذكر فلا ينسى وأن يشكر فلا يكفر. شريحـة ثابتـة لعلنا نحسن من خلالها أخلاقنـا و أفعالنا لنفوز يوم الامتحان الحقيقي Downloaded from http://staff.cst.ps/mfarra

3. Out Lines • Regular Expressions ,What and why ? • Introduction • Constructors • Count Tokens • Print Tokens • Token Processing Downloaded from http://staff.cst.ps/mfarra

4. What is Regular expressions? • Regular expressions are sequences of characters and symbols that define a set of strings. • They are useful for validating input and ensuring that data is in a particular format. Downloaded from http://staff.cst.ps/mfarra

5. Regular expressions Application • A large and complex regular expression is used to validate the syntax of a program. • If the program code does not match the regular expression, the compiler knows that there is a syntax error within the code. Downloaded from http://staff.cst.ps/mfarra

6. Regular expressions: Special symbols • A regular expression consists of literal characters and special symbols. Downloaded from http://staff.cst.ps/mfarra