Search code examples
regexultraedit

How to remove the bracket in strings like "(2003)" using ultraedit and regular expressions?


I am going the remove the bracket for strings like "(1978)", "(2003)" in ultraedit. Actually I know how to locate these strings using a regular expression:\(\d{4}\), but I don't know how to remove the bracket. Any help would be appreciated.


Solution

  • Find following pattern:

    \((\d{4})\)
    

    and replace that with:

    ^1
    

    See Regular expression for Ultraedit

    ^1

    Numerical reference to tagged expressions. Text matched with tagged expressions may be used in Replace commands with this format.

    ^1 corresponds to \1 or $1 (backreference) in other regular expression engines.