Alpha Software Mobile Development Tools:   Alpha Anywhere    |   Alpha TransForm subscribe to our YouTube Channel  Follow Us on LinkedIn  Follow Us on Twitter  Follow Us on Facebook

Announcement

Collapse

The Alpha Software Forum Participation Guidelines

The Alpha Software Forum is a free forum created for Alpha Software Developer Community to ask for help, exchange ideas, and share solutions. Alpha Software strives to create an environment where all members of the community can feel safe to participate. In order to ensure the Alpha Software Forum is a place where all feel welcome, forum participants are expected to behave as follows:
  • Be professional in your conduct
  • Be kind to others
  • Be constructive when giving feedback
  • Be open to new ideas and suggestions
  • Stay on topic


Be sure all comments and threads you post are respectful. Posts that contain any of the following content will be considered a violation of your agreement as a member of the Alpha Software Forum Community and will be moderated:
  • Spam.
  • Vulgar language.
  • Quotes from private conversations without permission, including pricing and other sales related discussions.
  • Personal attacks, insults, or subtle put-downs.
  • Harassment, bullying, threatening, mocking, shaming, or deriding anyone.
  • Sexist, racist, homophobic, transphobic, ableist, or otherwise discriminatory jokes and language.
  • Sexually explicit or violent material, links, or language.
  • Pirated, hacked, or copyright-infringing material.
  • Encouraging of others to engage in the above behaviors.


If a thread or post is found to contain any of the content outlined above, a moderator may choose to take one of the following actions:
  • Remove the Post or Thread - the content is removed from the forum.
  • Place the User in Moderation - all posts and new threads must be approved by a moderator before they are posted.
  • Temporarily Ban the User - user is banned from forum for a period of time.
  • Permanently Ban the User - user is permanently banned from the forum.


Moderators may also rename posts and threads if they are too generic or do not property reflect the content.

Moderators may move threads if they have been posted in the incorrect forum.

Threads/Posts questioning specific moderator decisions or actions (such as "why was a user banned?") are not allowed and will be removed.

The owners of Alpha Software Corporation (Forum Owner) reserve the right to remove, edit, move, or close any thread for any reason; or ban any forum member without notice, reason, or explanation.

Community members are encouraged to click the "Report Post" icon in the lower left of a given post if they feel the post is in violation of the rules. This will alert the Moderators to take a look.

Alpha Software Corporation may amend the guidelines from time to time and may also vary the procedures it sets out where appropriate in a particular case. Your agreement to comply with the guidelines will be deemed agreement to any changes to it.



Bonus TIPS for Successful Posting

Try a Search First
It is highly recommended that a Search be done on your topic before posting, as many questions have been answered in prior posts. As with any search engine, the shorter the search term, the more "hits" will be returned, but the more specific the search term is, the greater the relevance of those "hits". Searching for "table" might well return every message on the board while "tablesum" would greatly restrict the number of messages returned.

When you do post
First, make sure you are posting your question in the correct forum. For example, if you post an issue regarding Desktop applications on the Mobile & Browser Applications board , not only will your question not be seen by the appropriate audience, it may also be removed or relocated.

The more detail you provide about your problem or question, the more likely someone is to understand your request and be able to help. A sample database with a minimum of records (and its support files, zipped together) will make it much easier to diagnose issues with your application. Screen shots of error messages are especially helpful.

When explaining how to reproduce your problem, please be as detailed as possible. Describe every step, click-by-click and keypress-by-keypress. Otherwise when others try to duplicate your problem, they may do something slightly different and end up with different results.

A note about attachments
You may only attach one file to each message. Attachment file size is limited to 2MB. If you need to include several files, you may do so by zipping them into a single archive.

If you forgot to attach your files to your post, please do NOT create a new thread. Instead, reply to your original message and attach the file there.

When attaching screen shots, it is best to attach an image file (.BMP, .JPG, .GIF, .PNG, etc.) or a zip file of several images, as opposed to a Word document containing the screen shots. Because Word documents are prone to viruses, many message board users will not open your Word file, therefore limiting their ability to help you.

Similarly, if you are uploading a zipped archive, you should simply create a .ZIP file and not a self-extracting .EXE as many users will not run your EXE file.
See more
See less

text parsing in a field

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    #16
    RE: text parsing in a field

    yes you are right but such cases are very rare and anyway I check them carefully before saving.
    Unfortunately, not all correspondents use the semicolon.
    anyway it would be much easier to make some minor corrections instead to copy and paste thousands of lines.

    regards,
    Corneliu

    Comment


      #17
      RE: text parsing in a field

      yes, it works now but it does not parse website in foll format

      Website: www.crownint.biz

      I think parsing of www. is enough to assume that it is a web site even without http

      Thanks vm for your efforts.

      regards
      Corneliu

      Comment


        #18
        RE: text parsing in a field

        Hi Steve,

        I have done a lot of testings last night and the routine parses correctly in most situations. However most people indicate their web site address in the format www.****.****
        not http://www.******
        I have modified the events routine like that
        webs = filter_string(memtest:mem.value,"www.")
        and it works in most situations

        I have tried to use a regular expression here to accomodate both alternatives but is does not work
        webs = filter_string(memtest:mem.value,"www.|http")

        Is it possible to use a regular expression here and how can it be done?

        Also I need a checkbox on the form D0NT_PARSE when checked
        the text from memo field not to be parsed.
        Maybe in some situations parsing is not needed.

        Also in case I use the short form www.****.**** is it possible in the WEB field to add the correct prefix "http" so that in the database the web site address is stored in the correct format?

        Regards,
        Corneliu

        Comment


          #19
          RE: text parsing in a field

          Hi Steve,

          I discovered a case where parsing is not done corectly like in foll example:

          MSN: [email protected]

          E-MAIL: [email protected]
          [email protected]

          in this case only the second email is parsed correctly but
          the result is forwarded to EMAIL3 instead of EMAIL1 or EMAIL2

          Regards,
          Corneliu

          Comment


            #20
            RE: text parsing in a field

            Hi Steve,

            regarding my previous msg reporting parsing errors, I think it has to do with empty lines because the program counts all lines even the empty ones.
            I think it is a good idea at the beginning of the routine to delete all empty line and all empty spaces at the beginning of the lines.
            This is would be useful anyway for formating the text.

            regards,
            Corneliu

            Comment


              #21
              RE: text parsing in a field

              Corneliu,

              Attached is an update to the test application. You are right that it is difficult or impossible to check for one substring or another with one call to filter_string(). However, we can concatenate multiple calls into one final list.

              The only problem with that approach is that any line that included both substrings would appear twice. We can alleviate that situation with the word_unique() function. Thus, the new attachment has the following:

              ?st
              = An Email:: som@none
              [email protected]
              email: not@here
              Web http://www.unimart.cl

              webs = word_unique(filter_string(st,"http:")+crlf()+filter_string(st,"www.")+crlf()+filter_string(st,".com")+crlf()+filter_string(st,".net"))

              ?webs
              = Web http://www.unimart.cl
              [email protected]

              If not for the word_unique() function, the last line would be included twice (once for the "http:" substring and again for "www."). I threw in the ".net" and ".com" substrings for the cases you mentioned which did not get parsed correctly before.

              Steve

              Comment


                #22
                RE: text parsing in a field

                Hi Steve,

                First of all I want to thank you very much for your efforts in solving this case.
                This new test application is better but however it does not catch all www.*** sites

                I will provide below some examples not parsed by the program

                www.brouwership.de
                WEB-SITE: WWW.AZOVBALT.RU

                A strange case is the foll

                [email protected]

                [email protected]

                [email protected]

                where 2 of the emails are parsed correctly and one is parsed as a web site

                after deleting +crlf()+filter_string(st,".com")
                from the routine, the web site dissapear but still only 2 emails are parsed correctly
                After deleting the empty lines, all are parsed correctly.

                I think the empty lines should be deleted before the start of parsing process.

                Also there is no need to check for 2 web sites, because it is unusual that a company has 2 web sites. so you can delete checking for the second web site.

                It would be useful to add instead a field called COMPANY
                and the rule is that any text is written on the first line
                is parsed as "company"
                Of course, this line should not be empty, not contain numbers, or emails or web sites.

                Thanks and regards,
                Corneliu

                Comment


                  #23
                  RE: text parsing in a field

                  Corneliu,

                  You are right on two accounts. I should not have put the ".com" substring in for the web addresses. DUH? And also there are blank lines generated from the concatenation.

                  As for the blank lines, I removed them with the statement:
                  Code:
                  webs = word_subtract(webs,"",crlf())
                  In addition, I noticed that more than one trailing blanks could pose a problem. Hence, I added:
                  Code:
                  webs = *for_each(foo,alltrim(foo),webs)
                  I hope this helps out.

                  Steve

                  Comment


                    #24
                    RE: text parsing in a field

                    Congratulations!. It works much better than before now.
                    I had however to delete .net from the concatenation string
                    to avoid emails ending in .net to be parsed as web sites

                    one problem still remains, the routine can not detect the the space after the email or web site and is parsing everything after @ as email even if it is separated by a space.

                    regards,
                    Corneliu

                    Comment


                      #25
                      RE: text parsing in a field

                      Cornneliu,

                      This brings up another consideration about the way I set it up. Namely, I assumed that the dta you wanted would be the last space-delimited word on a selected line. If you have spaces sometimes thrown in, it will be difficult to determine what pieces you want to parse out.

                      line = "my email: [email protected]"

                      ?word(line,-1," ")
                      = "[email protected]"

                      line = "my email: solar@ solarshipping.com"

                      ?word(line,-1," ")
                      = "solarshipping.com"

                      Thus, for my approach to work, the substring which you want to retrieve must be the last substring on the line separated by a space. How else would you determine whether you wanted the last substring or the last two?

                      Steve

                      Comment


                        #26
                        RE: text parsing in a field

                        On a routine similar to this, I have a mirror table I call exceptions - all the ones I can't parse I copy to the exceptions table and send an alert so they can manually deal with the exceptions
                        Cole Custom Programming - Terrell, Texas
                        972 524 8714
                        [email protected]

                        ____________________
                        "A young man who is not liberal has no heart, but an old man who is not conservative has no mind." GB Shaw

                        Comment


                          #27
                          RE: text parsing in a field

                          No, I meant is that in a line like this

                          [email protected] xyz aaaa

                          the parsing result is aaaa

                          in a line like this

                          [email protected] xyz

                          the parsing result is xyz

                          so practically the email must be the last word on the line to be parsed correctly.

                          I thought that maybe there is a way to detect the space between the email and the next word on the line.

                          Regards,
                          Corneliu

                          Comment


                            #28
                            RE: text parsing in a field

                            I would be interested to see a sample of your routine may I can get some ideas

                            Regards,
                            Corneliu

                            Comment


                              #29
                              RE: text parsing in a field

                              Corneliu,

                              I didn't realize you may have other text following the desired substring. One approach may be to replace the word(txt,-1," ") function call with another filter_string() call:

                              Code:
                              txt = "vsvs [email protected] xyz aaaa"
                              
                              ?word(txt,-1," ")
                              = "aaaa"
                              
                              ?filter_string(txt,"@"," ")
                              = "[email protected]"
                              I can take a closer look at this later.

                              Steve

                              Comment


                                #30
                                RE: text parsing in a field

                                yes it may happen that the email is not the last word in the line. Take you time. I do not want to abuse of your kindness. You have also other things to do.
                                Maybe you can take a look at it later.
                                Anyway you alredy did a very fine job!
                                Thanks a lot!

                                Sincerely yours,
                                Corneliu

                                Comment

                                Working...
                                X