6 Replies Latest reply on May 28, 2015 4:08 PM by philmodjunk

    Parsing

    Kirk_1

      Title

      Parsing

      Post

      I am parsing a record and this is the last part i need to get rid of:

      "Total"

       113.66,

       

      How do I get the  

      "

      and the

      ,

      Out of the record?

       

      I tried Substitute """ for "" that did not work...

      I tried trim"" but that got rid of the " and what is in-between it... "total"

        • 1. Re: Parsing
          philmodjunk

          You appear to have smart quotes while your substitute attempts to remove straight quotes--which are different characters.

          Try this substitute function call:

          Substitute ( yourtexthere ; [Char ( 8220 ) ; "" ] ; [Char ( 8221 ) ; "" ) ] ; ["," ; "" ] )

          • 2. Re: Parsing
            Kirk_1

            That fixed the comma, but not the parenthesis.

            I'm on Windows 8, i googled it and see how to change from straight to smart with in programs. How do i do it FM?

             

             

            • 3. Re: Parsing
              Kirk_1

              I copied them from the txt... to put into the formula...

              • 4. Re: Parsing
                philmodjunk

                There are no parenthesis shown in your text example, only quotation marks.

                There's a setting in preferences for enabling smart quotes. You can edit Preferences from the Edit menu if you are on Windows. I forget where they put it on Mac systems.

                You can put straight quotes into an expression such as for substitute like this:

                "\""

                The backslash "escapes" the quote character immediately after it so that it is treated as a character and not the end of your quoted text.

                • 5. Re: Parsing
                  Kirk_1

                  That worked, last thing...

                  in some of the records the value is

                  Total

                       113.66

                  I need to remove the space in front of the 113.66.

                  I tried

                  Trim (GetValue (TempEdi::TempEdi;2))

                  That function removes the word Total and moves the 113.66 to the left.

                  Any suggestions?

                  • 6. Re: Parsing
                    philmodjunk

                    Don't know if that leading text is a string of spaces, a tab or some more esoteric nonvisible character(s).

                    You might try the TrimAll function as a way to reduce the spaces between text to a single space character.

                    Or you can use [" " ; "" ] to remove any spaces found in the text. But this might not be text. You might need to use Char with the code  for a tab if this is a leading tab character.