forum.vdsworld.com Forum Index forum.vdsworld.com
Visit VDSWORLD.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


String processing DLL
Goto page Previous  1, 2, 3 ... 10, 11, 12
 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> Other Product Support/Announcements
View previous topic :: View next topic  
Author Message
LiquidCode
Moderator Team


Joined: 05 Dec 2000
Posts: 1751
Location: Space and Time

PostPosted: Tue Nov 13, 2012 3:42 pm    Post subject: Reply with quote

I have the full version (well, by boss does), where do I/does he get that?
_________________
Chris
Http://theblindhouse.com
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Dr. Dread
Professional Member
Professional Member


Joined: 03 Aug 2001
Posts: 1065
Location: Copenhagen, Denmark

PostPosted: Tue Nov 13, 2012 8:46 pm    Post subject: Reply with quote

LiquidCode wrote:
I have the full version (well, by boss does), where do I/does he get that?


Follow the instructions in your/his registration email - or PM/email me...

Greetz
Dread

_________________
~~ Alcohol and calculus don't mix... Don't drink and derive! ~~

String.DLL * advanced string processing
Back to top
View user's profile Send private message
Dr. Dread
Professional Member
Professional Member


Joined: 03 Aug 2001
Posts: 1065
Location: Copenhagen, Denmark

PostPosted: Thu Nov 15, 2012 4:21 pm    Post subject: Reply with quote

Ooops. Embarassed I screwed this one (5.10) up by working with an outdated source code file. So at least one function disappeared.

5.11 should be better and is available for download.

Greetz
Dread

_________________
~~ Alcohol and calculus don't mix... Don't drink and derive! ~~

String.DLL * advanced string processing
Back to top
View user's profile Send private message
DaveR
Valued Contributor
Valued Contributor


Joined: 03 Sep 2005
Posts: 413
Location: Australia

PostPosted: Mon Mar 04, 2019 5:53 am    Post subject: Reply with quote

Does the good Dr still visit here occasionally?

Or does anyone have a copy of string.dll personal in version 5.8 or either of the 5.9 versions Question Or even version 5.5 or 5.7 Question

I have String.dll 5.11 and 5.3 (plus older versions) but I use only 5.3 because I have issues with 5.11

In 5.3 @string@CountRep,Lines) works.
In 5.11 @string@CountRep,Lines) returns the same as @string@CountRep)

If I call @string(RegxRepInFile, a 2nd time in the script and the 2nd operation makes no changes to the file:
5.3 returns 0 as expected.
5.11 returns the number of replacements made by the previous successful operation.

Then in 5.3 @string@Count) also returns 0 as expected.
Again 5.11 @string@Count) returns the number of replacements made by the previous successful @string(RegxRepInFile, operation (not the last operation).


But 5.11 is better than 5.3 in other ways. Like @string(RegxRepInFile, can process multiple lines or the whole file. I have been unable to get @string(RegxRepInFile, in 5.3 to process more than 1 line at a time.

If I could process more than 1 line at a time with @string(RegxRepInFile, and have it return 0 if there was no match I'd be a happy little vegemite.

_________________
cheers

Dave
Back to top
View user's profile Send private message
DaveR
Valued Contributor
Valued Contributor


Joined: 03 Sep 2005
Posts: 413
Location: Australia

PostPosted: Tue Mar 05, 2019 2:22 am    Post subject: Reply with quote

I've found a solution to @string(RegxRepInFile, returning the number of changes from the previous operation if this operation makes no changes to the file.

Code:
  # Lists used to prevent false result being added to our changes count
  list create,1
  list create,2

  # Workaround for String.dll 5.11 bug - part 1
  # Load file into list to compare after string regxrepinfile op
  list loadfile,1,%%File

  %C = @string(RegxRepInFile,%%File,%%File,%%SearchRegex,%%ReplaceString,)

  # Workaround for String.dll 5.11 bug - part 2
  list loadfile,2,%%File
  rem if @equal(@text(1),@text(2))
  rem We need to compare file hashes as comparing list text ignores case differences (VDS 6 can use CRC32. For VDS 5 use MD5)
  if @equal(@encrypt(@text(1),crc),@encrypt(@text(2),crc))
    # File hasn't changed so ignore string 5.11's false result
    %C = 0
  end


I thought I could now use string.dll 5.11 in my app but I cannot get String.dll 5.11 to obey modifiers. I cannot turn off "dot matches newline" Sad

EDIT: Changed compare file line of code to be case-sensitive.

_________________
cheers

Dave


Last edited by DaveR on Tue Mar 05, 2019 11:30 pm; edited 1 time in total
Back to top
View user's profile Send private message
DaveR
Valued Contributor
Valued Contributor


Joined: 03 Sep 2005
Posts: 413
Location: Australia

PostPosted: Tue Mar 05, 2019 3:07 am    Post subject: Reply with quote

DaveR wrote:

I cannot get String.dll 5.11 to obey modifiers. I cannot turn off "dot matches newline" Sad

Yay! Very Happy

I just needed (?m-s) to make 5.11 work the same as 5.3 did.

e.g. in 5.3 this would match a line containing the word 'today'.
Code:
^.*today.*$

In 5.11 I need to use:
Code:
(?m-s)^.*(today).*$


or I can also use:
Code:
(?-s).*(today).*

_________________
cheers

Dave
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> Other Product Support/Announcements All times are GMT
Goto page Previous  1, 2, 3 ... 10, 11, 12
Page 12 of 12

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum

Twitter@vdsworld       RSS

Powered by phpBB © 2001, 2005 phpBB Group