Some Applications of Regular Expressions: Ms. Tayyaba Zaheer
Some Applications of Regular Expressions: Ms. Tayyaba Zaheer
Expressions
Ms. Tayyaba Zaheer
Applications of Regular Expressions
• Regular expressions have numerous
applications throughout computer science,
ranging from the compilers to the tasks we
perform every day (using search engines)
• Used in search engines for matching search
strings
• Used in the field of lexical analysis
Given HBL A/C, generate IBAN
• What is an IBAN
IBAN stands for International Bank Account
Number and is a number attached to all accounts
in the EU countries plus Norway, Switzerland,
Liechtenstein and Hungary. The IBAN is made up
of a code that identifies the country the account
belongs to, the account holder's bank and the
account number itself. The IBAN makes it easier
and faster to process cross-border payments.
How is an IBAN constructed
• The number comprises maximum 34 alpha-numerical
characters, which are structured as follows:
• Two letters representing the home country of the
account-holding bank (ISO 3166 country code with
two letters, e.g. PK for Pakistan, GB for UK)
• Two numbers that are a control key
• Maximum of 30 alphanumeric characters that
identify the bank and the ordinary account number
Solution
• Concatenate the country and control key
before the HBL NUST acount.
• Eg. HBL NUST A/C number
2292-7900-3425-03 (14 Digits, HBL standard)
• PK22HABB 0022927000649601
• Bank identifier: HABB
• Therefore, Swift Key would be: HABB PKKA
• Source: http://advancement.nust.edu.pk/pages/bank-details
Look at the above form, filled by a user . Find what can you do to
help the user to get the same form with minimum entries?
DNA String Matching
More Applications/Examples
Email Addresses
Valid Dates
Deleting Duplicate Lines etc.