regex to parse text

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #7851
    sean mortara
    Participant

      Any possibility of parsing a text column into data using regular expressions?

      #7876
      dgteam
      Moderator

        Hi Sean,

        We have talked about this as a future possibility but don’t have a specific plan to implement at this time.  What always helps us is a specific use case and not sure that a lot of users would take advantage of this.

        What might be useful is to check out the Number from Text column that is in the beta version.  This has several ways to extract text from a number column.  We would be curious if this could work for what you are doing.

        Here is a link to the documentation, where we just added a bit more detail:

        Number from Text

         

        #8238
        sean mortara
        Participant

          In one instance, I had a column of monetary data that ranged from $0 to several 10’s of million where the numbers were formatted with thousands comma separators.  In this instance DataGraph would not recognize the column as a number.  As I recall, the number from text would not work because the values ranged so much in magnitude that it was not possible to formulate a single conversion method.

          The latest instance I ran across, I had collected weight data where the column text was expressed as either “x oz ( y g )” or “x1-x2 oz ( y1-y2 g)”.  Perhaps the number from text would work here, but regex formulations is a very familiar and versatile standard for people that regularly parse text.

          What would be useful would be to incorporate regex in the current formula expression since multiple capture groups can be identified in a single text.  In the above weight example, I would liked to have converted the entries that had a range into a single mean value by capturing the min and max and averaging.

          Thanks for the response and consideration as a future feature.

          #13610
          sam
          Participant

            Adding my voice on this one, regex in the context described would be a nice feature to have, expanding DG’s good capabilities in the date/time transformation department (e.g. ICU formatting) into other types of fields.

          Viewing 4 posts - 1 through 4 (of 4 total)
          • You must be logged in to reply to this topic.