Remove Middle [ ]

Hello
Below Line i need to remove only those [ ] in the middle any one can help

Input :-
[WHO,WITHOUTACTMLOGO][CAT-CAT][SSLC,PQRG][SQL] 2D materialcode No.: [1504]" StandardQuantity=“1.500” SOM=“” SystmID=“1” AlternateMaterialSystemID=“” O

Output:-

[WHO,WITHOUTACTMLOGO][CAT-CAT][SSLC,PQRG][SQL] 2D materialcode No.: 1504" StandardQuantity=“1.500” SOM=“” SystmID=“1” AlternateMaterialSystemID=“” O

@Shriharsha_H_N,

Use string remove operation as like this,

strInput.Remove(strInput.LastIndexOf("["), 1)

Hi
the expression is
system.Text.RegularExpressions.Regex.Replace(str_input,“[[\d]+]”,System.Text.RegularExpressions.Regex.Match(str_input,“\w[\d]+\w\w”).ToString).ToString

where str_input is the string varaible holding the string input
and it worked

here you go with a xaml
sqrbrc.zip (9.6 KB)
image

Cheers @Shriharsha_H_N