Jump to content
Sign in to follow this  
DavidRM

TW3RegEx.Exec Error

Recommended Posts

TW3RegEx.Exec can return NULL, but I can't test a TStrArray = nil. Compiler gets frowny with me.

This was solved for TW3RegEx.Match:

function TW3RegEx.Match(s: String): TStrArray;
begin
  asm
    @Result = (@s).match(@Self.FRegEx);
    if (@Result===null) @Result=[];
  end;
end;

 

TW3RegEx.Exec needs to be fixed in a similar way.

-David

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×