Reply To: remove last .br with regular expression

Clovertech Forums Read Only Archives Cloverleaf Cloverleaf remove last .br with regular expression Reply To: remove last .br with regular expression

#56990
Robert Kersemakers
Participant

    Hi Jennifer,

    Try this to remove the last .br from var1 and put the result in var2:

    Code:


    regsub -all {\.br\$} $var1 “” var2

    This will only work if the .br is the last string in the line! I think this will do, but if there is text after the last .br, you will need some more code…

    Zuyderland Medisch Centrum; Heerlen/Sittard; The Netherlands