Replace a certain character with ENTER



  • Hi, I have to change the following

    text text ******* text text
    text text ******* text text

    To

    text text
    text text
    text text
    text text

    Which means, replacing (*******) with an enter

    Kindly suggest a solution

    Thanks



  • search -> replace

    check “search mode: extended”

    replace with: “\n” (without the quotes)



  • Since @patrickdrd 's solution was a tad unclear, I’d suggest:

    Find: \s*\*+\s*
    Replace: \r\n for Windows-formatted file OR \n for Linux-formatted file
    Search mode: Regular Expression

    Of course, maybe the OP’s usage of * was just an example. This is unfortunate as * is a special character and needs “escaping” with \ when used in a reg exp, which just makes the whole thing appear more cryptic/complicated. :)


Log in to reply