Jump to content
  • 0

[Custom Functie] FindRepetition()


Peter Wagemans

Question

syntax:

FindRepetition ( searchString; repeatingField; start; occurrence; end; partialMatch; matchCase )

voorbeeld input en resultaat: zie bijgevoegd bestandje

Let (
theString = GetRepetition ( repeatingField ; start ) ;
Case ( 
start > end ; 0 ;
PatternCount ( theString ; searchString ) = 0 ; FindRepetition ( searchString; repeatingField ; start + 1 ; occurrence ; end ; partialMatch ; matchCase ) ;
partialMatch = 0 and theString <> searchString ; FindRepetition ( searchString; repeatingField ; start + 1 ; occurrence ; end ; partialMatch ; matchCase ) ;
partialMatch = 0 and matchCase <> 0 and not Exact ( theString ; searchString ) ; FindRepetition ( searchString; repeatingField ; start + 1 ; occurrence ; end ; partialMatch ; matchCase ) ;
partialMatch <> 0 and matchCase <> 0 and ( not FindRepetition ( searchString; Middle ( theString ; Position ( theString ; searchString ; 1 ; 1 ) ; Length ( searchString ) ); 1 ; 1 ; 1 ; 0 ; 1) ); FindRepetition ( searchString; repeatingField ; start + 1 ; occurrence ; end ; partialMatch ; matchCase ) ;
occurrence <> 1 ; FindRepetition ( searchString; repeatingField ; start + 1 ; occurrence - 1 ; end ; partialMatch ; matchCase ) ;
start
)
)

FindRepetition.fp7

Link to comment

3 answers to this question

Recommended Posts

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...