Professional Web Applications Themes

Struggling with parsing test with parentheses. - FileMaker

Hi, I want to p the email from this big field: Below is the result of your feedback form. It was submitted by (net) on Tuesday, March 2, 2004 at 21:46:47 --------------------------------------------------------------------------- I am doing this as a calculation field: Middle(Body,Position(Body, "submitted by", 1, 1) + Length("submitted by"),Position(Body & "on", "on", Position(Body, "submitted by", 1, 1), 1) - (Position(Body, "submitted by", 1, 1) + Length("submitted by"))) Please note that there is a hard return after the "by" I am getting this as a result: (in quotes) " (net) " How do I get this without the return, and without the ...

Sponsored Links
  1. #1

    Default Struggling with parsing test with parentheses.

    Hi,

    I want to p the email from this big field:

    Below is the result of your feedback form. It was submitted by
    (net) on Tuesday, March 2, 2004 at 21:46:47
    ---------------------------------------------------------------------------

    I am doing this as a calculation field:

    Middle(Body,Position(Body, "submitted by", 1, 1) + Length("submitted
    by"),Position(Body & "on", "on", Position(Body, "submitted by", 1, 1),
    1) - (Position(Body, "submitted by", 1, 1) + Length("submitted by")))

    Please note that there is a hard return after the "by"

    I am getting this as a result: (in quotes)

    "
    (net) "

    How do I get this without the return, and without the parentheses?

    Tor
    Sponsored Links
    torlissa Guest

  2. #2

    Default Re: Struggling with parsing test with parentheses.

    In article <google.com>,
    net (torlissa) wrote:
     

    Since you know "submitted by" plus the return plus the space and the (
    are always 15 characters long you can ditch that calculation:
    ie.
    EmailAddress = Middle(Body, Position(Body, "submitted by", 1, 1) + 15,
    Position(Body, " on ", 1, 1) - Position(Body,
    "submitted by", 1, 1) - 16)

    It's minus an extra one at the end to remove the closing )

    Note: I'm not sure why your adding an extra "on", but you should avoid
    using Position(Body, "on" since the email address might contain "on".
    It's better to use " on " since spaces can't be in an email address (at
    least not one that works).


    In fact, if all the data is EXACTLY the same except for the email
    address, then you can just use the brackets as the delimiters and avoid
    the return entirely.
    ie.
    EmailAddress = Middle(Body, Position(Body, "(", 1, 1) + 1,
    Position(Body, ")", 1, 1) - Position(Body, "(", 1, 1)
    - 1)




    Helpful Harry
    "Hopefully helping harassed humans happily handle handiwork hardships" ;o)
    Helpful Guest

  3. #3

    Default Re: Struggling with parsing test with parentheses.

    net (torlissa) wrote in message news:<google.com>...

     

    If the parantesis always occure would I do like this:

    Middle(theText,
    Position(theText, "(", 1, 1)+1,
    Position(theText, ")", 1, 1)- Position(theText, "(", 1, 1)-1)

    --sd
    S?ren Guest

  4. #4

    Default Re: Struggling with parsing test with parentheses.

    Thank you all so much!

    got it!

    tor
    torlissa Guest

Similar Threads

  1. Struggling
    By Eva Pinder in forum Macromedia Contribute General Discussion
    Replies: 0
    Last Post: December 18th, 10:59 PM
  2. Parentheses
    By Nikolai Weibull in forum PERL Beginners
    Replies: 30
    Last Post: December 15th, 02:49 PM
  3. format numbers with parentheses
    By Rob in forum ASP.NET Data Grid Control
    Replies: 0
    Last Post: November 4th, 05:00 PM
  4. Substitution and Text Within Parentheses
    By Addy in forum PERL Miscellaneous
    Replies: 2
    Last Post: August 26th, 01:15 PM
  5. Struggling with LPR
    By Jon Rook in forum Linux Setup, Configuration & Administration
    Replies: 0
    Last Post: August 5th, 11:40 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139