0% found this document useful (0 votes)
130 views

Some Applications of Regular Expressions: Ms. Tayyaba Zaheer

Regular expressions have many applications in computer science, including search engines, compilers, and everyday tasks. They are used to match search strings in search engines and for tasks in lexical analysis. Regular expressions can be used to generate International Bank Account Numbers (IBANs) from local bank account numbers by concatenating country and bank codes. They can also extract swift codes from IBANs or local bank account numbers by identifying the bank identifier code. Regular expressions have additional applications like validating email addresses, dates, and removing duplicate lines.

Uploaded by

Mansoor Qaisrani
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
130 views

Some Applications of Regular Expressions: Ms. Tayyaba Zaheer

Regular expressions have many applications in computer science, including search engines, compilers, and everyday tasks. They are used to match search strings in search engines and for tasks in lexical analysis. Regular expressions can be used to generate International Bank Account Numbers (IBANs) from local bank account numbers by concatenating country and bank codes. They can also extract swift codes from IBANs or local bank account numbers by identifying the bank identifier code. Regular expressions have additional applications like validating email addresses, dates, and removing duplicate lines.

Uploaded by

Mansoor Qaisrani
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 10

Some Applications of Regular

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)

We have to find the string for HBL Pakistan and


concatenate before the a/c number
Eg. PK-22-HABB-0022927000649601
Given the IBAN, Generate Pakistan Bank’s
Swift Key
• PK85MEZN0003040101443855d
• Bank identifier: MEZN
• Therefore, Swift Key would be: MEZN PKKA

• 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.

• For details, please visit:


http://www.regular-expressions.info/examples.html
Thank You!

You might also like