c# - Regexp.Short representation of ip address -


I need less representation of IP address. Instead, 0.0.0.0 0.0.0.0 should be 0.0.0.0.0 For example,

source file:

  set address "unstusted GN "" 172.30.2.130/32 "172.30.2.130 255.255.255.255 set out" Asatyst "" 190.8.35.230/32 "190.8.35.230 255.255.255.255 set out" Anstrst GN "217.118.69.0/24" 217.118.69.0 255.255.255.0  

output file:

  set the "Anstrst GN" "172.30.2.130/32" 172.30.2.13/32 set address "Antrst GN" "190.8.35.230/32" 190.8.35.230/32 set out "UntrustGn" "217.118.69.0/24" 217.118.6 9.0 / 24  

I have to Have tried but desired Did not receive Nam ... Help! Please!

  Strymreder reader = new Strymrider (opendialog.FileName); string pattern address Zone = @ "set" ". * "" "". * "" [0-9] +. [0-9] +. [0- 9] + [0-9] + ([0- 9] + [0-9] + [0-9] + [0-9] +) "... var matches zone = Regex.Matches ( reader.ReadToEnd (), Patrnjon); ( "255.255.255.255", "/ 32");}  

  string resultString = null; try {resultString = Regex.Replace (subjectstring, @ "" "(\ d + \. \ d + \. \ d + \. \ d +) (/ \ d +)" "\ S * (\ d + \. \ D + \. \ D + \. \ D +) \ s * \ d + \. \ D + \. \ D + \. \ D +", new matching evaluator ( Computer Replacement);} Hold (Logic Expression Pre) {// Syntax Error in Regular Expression} Public String Compute Replacement (Match Me) {// You For Yek replacement text can be changed to match-to-fly-back "\" $ 1 $ 2 \ "$ 3 $ 2"}}  

Comments

Popular posts from this blog

import - Python ImportError: No module named wmi -

Editing Python Class in Shell and SQLAlchemy -

c# - MySQL Parameterized Select Query joining tables issue -