How to Code Regular Expression Parsers

In SQL, parsing is used to extract data from the information stored in SQL databases. Regular expressions are utilized to validate data, find duplicate variable entries, locate any excess white space and parse strings. Regular expressions include: "REGEXP_INSTR," "REGEXP_SUBSTR" and "REGEXP_REPLACE" functions to start queries. Parsing will then pull up that data. Using the "BegParen" statement with your regular expressions can help find the text or variable you need quickly.

Instructions

    • 1

      Click "Start," type "CMD" and press "Enter." This will open the Command Prompt window.

    • 2

      Type "sqlplus" and press "Enter." This will launch the SQL Plus program.

    • 3

      Type "BegParen" to find the data and "REGEXP_LIKE" to assist with searching for all matching rows for this regular expression. For example, search for phone numbers in a table address containing a non-numeric character and then pressing "Enter":

      BegParen SELECT phone numbers FROM address WHERE

      REGEXP_LIKE(phone numbers, '[^[:digit:]]'

    • 4

      Type "Quit" to close the SQL Plus program and type "Exit" to close the command prompt window.

Related Searches:

References

Comments

Related Ads

Featured