Posted by : Arjun Lagisetty Tuesday, December 13, 2016

To extract host names we use a regular expression. You can use Regular expression editor in standard editors like Notepad++ or use http://regexr.com/


Regex:
(HOST\s?=\s?)(.*?)(\))

Extract second group from the matches using:
$2 \n 
Easiest way to use the above regex is in  http://regexr.com/

  1. Copy paste the tns file into Text editor
  2. Copy paste the expression into expression editor
  3. Enable global flag from "flags" on the top right to match entire file
  4. In Tools > list type the group extractor

Regex is a very important tool in your tool set to do complex string manipulation.

Example regex and file here:
http://regexr.com/3esbi


Leave a Reply

Subscribe to Posts | Subscribe to Comments

Popular Post

Labels

Blog Archive

Copyright © ODI Pundits - Oracle Data Integrator - Maintained by Arjun Lagisetty