Community

    • Login
    • Search
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search

    Replace a special character

    Help wanted · · · – – – · · ·
    3
    6
    1587
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Jose Emilio Osorio
      Jose Emilio Osorio last edited by

      Hi,
      I´m using this [^\x00-\x7F]+ to find the “no ASCII” characters and then replace them with a space. But when it finds 2 or more “no ASCII” characters together, it only replaces one space for all the characters that are together.
      Example:
      FIND: “ASASÉÉSSS”
      REPLACE: “ASAS SSS”

      And I need like this: “ASAS SSS” (two spaces)

      Any help ?.
      Thanks.

      Claudia Frank 1 Reply Last reply Reply Quote 0
      • Claudia Frank
        Claudia Frank @Jose Emilio Osorio last edited by

        @Jose-Emilio-Osorio

        dosn’t it help to replace the + mulitplier with a question mark?
        Like [^\x00-\x7F]?

        Cheers
        Claudia

        1 Reply Last reply Reply Quote 1
        • Scott Sumner
          Scott Sumner last edited by

          How about just forget the + and the ? altogether?

          Claudia Frank 1 Reply Last reply Reply Quote 1
          • Claudia Frank
            Claudia Frank @Scott Sumner last edited by Claudia Frank

            @Scott-Sumner

            :-D - good one, if this is the complete regex used by OP :-D

            Cheers
            Claudia

            Scott Sumner 1 Reply Last reply Reply Quote 1
            • Scott Sumner
              Scott Sumner @Claudia Frank last edited by Scott Sumner

              @Claudia-Frank

              Well, we RARELY get the full story here…with the FIRST posting.

              :-)

              (Looks like we got the full story THIS time–predicting the future!!!)

              1 Reply Last reply Reply Quote 2
              • Jose Emilio Osorio
                Jose Emilio Osorio last edited by

                Thanks. It works without the + and ?.

                1 Reply Last reply Reply Quote 1
                • First post
                  Last post
                Copyright © 2014 NodeBB Forums | Contributors