How can i parse oracle tnsname values in c#? -


i have key in webconfig , want values.

<add name="f8connection" connectionstring="data source=(description=(address=(protocol=tcp)(host=localhost)(port=1521))(connect_data=(sid=prod)));user id=$username;password=$password" providername="oracle" /> 

ex. need "host" value.

what best way parse ?

thx

i prefer regex.

var host = new regex("host=(?<host>([a-z0-9]+))").match("<add name='f8connection' connectionstring='data source=(description=(address=(protocol=tcp)(host=localhawd1221ost)(port=1521))(connect_data=(sid=prod)));user id=$username;password=$password' providername='oracle' />").groups["host"].value; 

Comments

Popular posts from this blog

javascript - Jquery show_hide, what to add in order to make the page scroll to the bottom of the hidden field once button is clicked -

javascript - Highcharts multi-color line -

javascript - Enter key does not work in search box -