Which version build do you have?kluv wrote:I do have the expanded version
Actually, it should not be a need for a batch. The presets from the "Move field parts" menu are intended for such requests. The "Move rightmost part of <Into Field> between (and including) specified strings to +/- specified character position" could be used in your case with the following settings:kluv wrote:if you would list the 5 presets I need I can start putting them together.
- Opening string: -
- Closing string: empty
- Remove opening string: checked
- Insert position: -6
- Prefix: empty
- Suffix: -
However, that preset and several another "rightmost" ones have a bug when the Closing string is empty. Here is the fixed Replace with string for this preset:
Code: Select all
RegSub(RegSub("$&", SetVar(0, "^(.*)(<If Caption="Use RegEx to specify strings" Value=0 ID=1><Else>" & RegSub("<End If><String Caption="Opening string" Value=" ("><If ID:1><Else>", "[$^*()+[\]\\{}|.?]", "\$$&") & "<End If>)(.*)(<If ID:1><Else>" & RegSub("<End If><String Caption="Closing string" Value=")"><If ID:1><Else>", "[$^*()+[\]\\{}|.?]", "\$$&") & "<End If>)"), "$1<If Caption="Remove opening string" Value="1"><Else>$2<End If><If Caption="Remove closing string" Value="1"><Else>$4<End If>"), IIf(<Number Caption="Insert position" Value="-1" MinValue="-100" ID:-1> >= 0, "^.{" & <ID:-1> - 1 & "}", ".{" & -<ID:-1> - 1 & "}$"), IIf(<ID:-1> >= 0, "$$&", "") & IIf(SetVar(1, Len(RegSub("$&", GetVar(0) & ".*|.*", "$2$3$4"))), "<String Caption="Prefix" Value=" [">", "") & RegSub("$&", GetVar(0) & ".*|.*", "<If Caption="Insert opening string" Value="0">$2<End If>$3<If Caption="Insert closing string" Value="0">$4<End If>") & IIf(GetVar(1), "<String Caption="Suffix" Value="] ">", "") & IIf(<ID:-1> < 0, "$$&", ""))