Parsing tnsnames.ora using regex

后端 未结 5 2149
谎友^
谎友^ 2020-12-21 05:36

I am attempting to pull some information from my tnsnames file using regex. I started with the following pattern:

MYSCHEMA *? = *?[\\W\\w\\S\\s]*\\(HOST *?= *

5条回答
  •  醉话见心
    2020-12-21 05:59

    The following regex will parse out individual TNS entries, and all you have to do is parse each result how you see fit for the names / values

    ([\w-]+)\s*=(?:\s|.)+?\)\s*\)\s*\)\s*(?=[\w\-])

    Example: https://regexr.com/3r2vn

提交回复
热议问题