trim double quotations

  1. 9 weeks ago

    Yoshimasa K

    Mar 27 Testers, Xojo Pro

    I can below conversion by Strjing.Trim method .

    " TEST "-> "TEST"

    I want to conversions as below.

    """TEST""" -> "TEST"

    Unfortunaly, String.Trim only space trim. How to double quotations trim?

  2. Emile S

    Mar 27 Europe (France, Strasbourg)

    What about ?

  3. Andrew L

    Mar 27 San Francisco, CA, USA
    Edited 9 weeks ago

    Or ReplaceAll .

  4. Robert B

    Mar 27 Testers, Xojo Pro Cincinnati, Ohio

    Replacing ALL triple quotes with a single quote will work in the examples you provided.
    result = source.replaceall("""""""","""") which could be done with variables if you don't like seeing that many quotes together.
    I'm not sure if you have examples of embedded triple quotes and how you want that handled.

  5. Yoshimasa K

    Mar 27 Testers, Xojo Pro

    Thank you. Currently, I use ReplaceAll.
    It works well below example.

    """TEST""" -> "TEST"

    However, below example is wrong:


    I want:


    If replacing ALL triple quotes with a single quote, escape character, or etc will work.
    But, it pollutes the contents of the text.

    So, I will write make code trim method with non-space characters. Thank you.

  6. Alberto D

    Mar 28 Testers, Xojo Pro Austin, Texas

    If you define the rules I'm sure someone can help you create a RegEx rule.

    For example, it is not clear to me what you want from something like this:

    ""T ""EST ""2 "" 3"

    maybe your needs will need more than one RegEx rule.

or Sign Up to reply!