Replacing an opening parenthesis by an opening parenthesis with a space directly after

Replacing an opening parenthesis by an opening parenthesis with a space directly after

1

    Nov 01, 2012#1

    My program version: 18.20.0.1020
    My operating system: Windows 7 Home Premium SP1 64-bit

    Hello,

    I'm currently looking for a way to replace an opening parenthesis by an opening parenthesis with a space directly after.
    Now this would be an easy search + replace action. No expressions needed.
    However, if possible, I'd like to skip the opening parenthesis already containing a space directly after.

    As an example:

    Code: Select all

    remove_filter('term_description', 'wpautop');
    to

    Code: Select all

    remove_filter( 'term_description', 'wpautop');
    or preferably

    Code: Select all

    remove_filter( 'term_description', 'wpautop' );
    I've been trying to solve this using Google, the search function, and Expresso. Unfortunately without any luck thus far.

    Would someone be able to assist here perhaps?

    Best Regards,

    Cor

    6,681583
    Grand MasterGrand Master
    6,681583

      Nov 01, 2012#2

      With the UltraEdit regular expression engine search for (^([~ ^t^r^n]^) and use as replace string ( ^1

      This is a tagged regular expression searching for an opening parenthesis followed by a character which is NOT a space, tab, carriage return or line feed.

      But you need to run this UltraEdit regular expression Replace All several times until nothing replaced anymore in case there are multiple opening parenthesis in a sequence.

      For the closing round parenthesis search for ^([~ ^t^r^n]^)) and use as replace string ^1 )

      Also this Replace All must be executed until nothing replaced anymore.

      Easier would be to simple run a non regular expression Replace All searching for ( and replacing with ( and a space character. Next run a Replace All searching for ( with 2 spaces and use as replace string ( with a single space. This results with just 2 Replace All in the wanted style for opening parenthesis. Next run a non regular expression Replace All searching for ) and replacing with a space charachter and ). Last run a Replace All searching for 2 spaces and ) and use as replace string a single space and ).