regular expression for sparse matching ?

Clovertech Forums Read Only Archives Cloverleaf Tcl Library regular expression for sparse matching ?

  • Creator
    Topic
  • #50165
    Klaus Wais
    Participant

      I try to parse and modify the NetConfig file with regsub.

      I would like to change the IP setting of a thread.

      The idea is to find the thread name in the NetConfig and then look for the first occurance of LOCAL_IP, etc. etc.

      The first pattern I tried was {.*protocol HL7_tcpip.*? LOCAL_IP} but the sparse matching seems not to work.

      (In the NetConfig there is a blank before LOCAL_IP)

      I found out that {.*protocol HL7_tcpip.*?LOCAL_IP} is doing the job.

      Any comments about the different behaviour of the 2 patterns ?

    • The forum ‘Tcl Library’ is closed to new topics and replies.