Getting amount of Occurrences

Ask a Question related to Macromedia ColdFusion, Design and Development.

  1. #1

    Default Getting amount of Occurrences

    My mind has gone blank... can't think of how to do this. I have a varable with
    text in it (CFHTTP.Filecontent). I need to see how many times '<table
    sytle='changeit'>' appears in that Filecontent varable. How can I do this.
    Thank you!

    Vbprog40 Guest

  2. Similar Questions and Discussions

    1. Strange memory occurrences with MX on XP
      Running Director MX version 9.0 on Windows XP sp1: Whilst Directors Memory Inspector is running, and after playing my Driector movie through...
    2. Fade a sound down to a certain amount, not 0
      Hi, I am fading a sound out by using the following - on exitFrame me sound(2).fadeOut(60) end This seems to work fine but can i fade the...
    3. Amount of data
      Hello. I am writing an application, that connects to mssql server via DB-Library, and the maximum amount of data, which I can get, is only 4096...
    4. Amount of site explored
      Hi all! I'm working on a Flash site right now which I'd like to make as 'sticky' as possible without becoming frustrating or inhibting the user to...
    5. How get number of occurrences in a variable?
      David - Neat ! *** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it!
  3. #2

    Default Re: Getting amount of Occurrences

    Use refindNoCase or refind

    If you use parentheses to denote subexpressions within the regular expression,
    the returnsubexpressions parameter returns the position and length of the first
    match of the regular expression in the first element of the respective arrays;
    the position and length of the first instance of each subexpression within the
    regular expression are returned in subsequent array elements.

    Ken

    The ScareCrow Guest

  4. #3

    Default Re: Getting amount of Occurrences

    Thanks, but I need to get a total number of how many Occurrensces there are of that expression. ReFind will only tell you the position the next one is in.

    Any other ideas?
    Thanks
    Vbprog40 Guest

  5. #4

    Default Re: Getting amount of Occurrences

    No, you need to read the text I posted from the docs

    the position and length of the first instance of each subexpression within the
    regular expression are returned in subsequent array elements.

    Thus the length of this array will give you the number of occurences.

    Ken

    The ScareCrow Guest

  6. #5

    Default Re: Getting amount of Occurrences

    MikerRoo Guest

  7. #6

    Default Re: Getting amount of Occurrences

    Thank you both for your help! Worked great!
    Vbprog40 Guest

Posting Permissions

  • You may not post new threads
  • You may 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