Replace Action

Hello:

I am trying to write a replace action to look for Open and Closed brackets [ ] and delete everything within the brackets INCLUDING the bracets.

Can someone show me the expression needed to delete any data between two brackets and the brackets also?

Thanks

BobVal

To give you a more detailled answer it would require to know more about the surrounding parts.
So I can give you only very general advice:

Create an action of the type "Replace with regular expression".
the wildcard for a universal string is ".*"
To separate and possibly reuse parts of the string, use "(" and ")".
To address reusable parts of a string, use $1, $2 etc.
So an expression for string with some text in front, inside and behind the brackets might look like this:

(.)([.])(.*)
To leave out the part in [ and ] enter (which would be string part $2)

$1 $3

Action: Replace with regular expression:
Field: _ALL
Regualar Expression: " *[.+?]" (without quotationmarks, just to show the leading space)
Replace matches with: "" (without quotationmarks, just nothing)

This solution will leave you a single space if the brackets occur at the begin of a line/field. For this case, se a second action:

Action: Replace with regular expression:
Field: _ALL
Regualar Expression: (^ | $)
Replace matches with: "" (without quotationmarks, just nothing)

Alternative solution:

Action: Format Value
Field: _TITLE
Formatstring: $trim($regexp(%title%,' *[.+?] *', ))

This solution works only for one tag field (TILE in th example), not with all fields in one go.

Thanks so much