Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 5843159
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T12:06:56+00:00 2026-05-22T12:06:56+00:00

I used to use HYPERSTR library for string processing routine. Now I use newer

  • 0

I used to use HYPERSTR library for string processing routine. Now I use newer Delphi. I need to search a pattern in a string, for example the old function is function IsMatchEx(const Source, Search:AnsiString; var Start:integer) : Integer;. Actually I don’t need the result value, I just wanna know if the pattern match with the string or not.

My old code (returns TRUE):

var
  StartPos: integer;
  FoundPos: integer;
begin
  StartPos := 1;
  FoundPos := IsMatchEx('abcdef', 'abcd?f', StartPos);
  if FoundPos > 0 then
    showmessage('match');
end;

I see that Delphi XE has TRegEx but I stil don’t understand to use it.

These code doesn’t return TRUE :

  if TRegEx.IsMatch('abcdef', 'abcd?f') then
    showmessage('match');

I also got same result when using MatchesMask.

Thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T12:06:57+00:00Added an answer on May 22, 2026 at 12:06 pm

    if ? represent a single character:

      if TRegEx.IsMatch('abcdef', 'abcd.f') then
        showmessage('match');
    

    if ? represent any sting:

      if TRegEx.IsMatch('abcdef', 'abcd.*f') then
        showmessage('match');
    

    Don’t have XE so haven’t tested.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I used to use this function to convert hex string to string in Delphi
I used to use the function below for an array or IP's but now
I used to use @RequestParam(a-b) String foo to receive the a-b parameter from http
I used to use the old-school method of adding an overlay to the camera
I used to use gcc compiler on my unix machine. I am now forced
we used to use a farpoint grid which made this quite easy but now
I used to use Eclipse Galileo, but now I have Helios. Galileo used to
I used to use netbeans for a while and really liked it. But now,
Im delphi programmer and used to use Java quite a bit a long while
(Python2.7-3.2 on WindowsXP) I used to use sys.arg[0], but now I'm executing it from

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.