Counting Run-On's
|
May. 23, 2013, 11:48 PM
(This post was last modified: May. 23, 2013 11:52 PM by ProxRocks.)
Post: #1
|
|||
|
|||
Counting Run-On's
is there a way to count [using LST(count) perhaps] how many TIMES a "repeat" is 'repeated'?
ie, let's say my filter match line is this, "([.-])\1+{4,2048}"... is there a way for the filter replace line to tell me if there were FOUR dots back-to-back or if there were FORTY dots back-to-back? something where the web page will show ...[+1] if there were FOUR dots or will display ...[+37] if there were FORTY dots... and in turn will display ...[+1834] if there were originally 1837 dots... |
|||
May. 24, 2013, 12:41 AM
(This post was last modified: May. 24, 2013 02:12 AM by JJoe.)
Post: #2
|
|||
|
|||
RE: Counting Run-On's
Something like
Code: [Patterns] If you don't need n Code: [Patterns] Note that $LST(Count) uses \0. HTH Edit:Limit=2048 |
|||
May. 24, 2013, 01:59 AM
Post: #3
|
|||
|
|||
RE: Counting Run-On's
looks good, will test in the morning...
i'm curious as to the limit being 2045... while my original 2048 is arbitrary, with the first three being caught by the first match line and 2045 being caught by the second line, if we did need to catch 2048, wouldn't the limit line be 2048 and the second line still be 2045? |
|||
May. 24, 2013, 02:11 AM
Post: #4
|
|||
|
|||
RE: Counting Run-On's | |||
May. 24, 2013, 11:07 AM
Post: #5
|
|||
|
|||
RE: Counting Run-On's
the "with n" version works like a charm...
without the n, the FIRST match for the filter will display the wrong count (perhaps the "i" from another filter)... much appreciated... |
|||
May. 24, 2013, 09:46 PM
Post: #6
|
|||
|
|||
RE: Counting Run-On's
(May. 24, 2013 11:07 AM)ProxRocks Wrote: without the n, the FIRST match for the filter will display the wrong count (perhaps the "i" from another filter)... Correct again. When sidki used that format he initialize the value of i. I didn't see where he finally cleared it, if ever. You could Code: [Patterns] Thanks |
|||
May. 24, 2013, 11:02 PM
Post: #7
|
|||
|
|||
RE: Counting Run-On's
how much of an advantage is there to go "without n" versus the "with n" version?
|
|||
May. 25, 2013, 02:44 AM
(This post was last modified: May. 25, 2013 02:44 AM by JJoe.)
Post: #8
|
|||
|
|||
RE: Counting Run-On's
That depends on the number of loops. With n each loop executes $SET(n=$GET(i)). The n version could be milliseconds slower.
Given 2048 dots: i version profiles at 18.247024 (milliseconds) n version profiles at 28.947115 (milliseconds) They fail in the same amount of time. Probably seems silly to most but it is something that I consider. |
|||
May. 25, 2013, 03:00 AM
Post: #9
|
|||
|
|||
RE: Counting Run-On's
cool...
i'll run with the newer i version... thanks again... |
|||
« Next Oldest | Next Newest »
|