1 (edited by mathmathou 2015-11-13 04:14:28)

Topic: [script] Extract sub-string from a string

Hello MVD fans and Dmitry,


Some more work for you.


Let say you are looking for a string or a character in a larger string, and you want to count how many times that string (or character) appears in a full page of text.


You can do it by using the Copy(Source, Position, Length) function and comparing the result with the string you are looking for.
WARNING : The Copy function is case sensitive. If you want to get ride of that, you can apply a lowercase() function to your text before searching (it's in the comment).


The code is fully commented step by step
.

Have a good day and... have some fun !! MVD is an awesome tool.


Cheers


Mathias


PS : this is my approach of the problem, there might be some more efficient ones, like RegEx for example.
PS2 : version is beta 2.2 but should work with other version

Post's attachments

Attachment icon SubString_in_String.zip 333.25 kb, 697 downloads since 2015-11-13 

I'm a very good housekeeper !
Each time I get a divorce, I keep the house

Zaza Gabor

Re: [script] Extract sub-string from a string

Доброго дня!
Спасибо за предоставленный пример!
Для новичка, кем сам являюсь...это находка!

С Уважением и Благодарностью Роман!!!