Skullcode 0 Posted November 1, 2020 (edited) i use this Regex function to check if the string have a Characters that I specify in the pattern on not Function CheckCharsinString(const astr: string):Boolean; var Regexs : TRegEx; i : integer; svalue : string; Allowed : string; begin svalue := Trim(astr); if Regexs.IsMatch(svalue, '^[ء-يA-Za-z0-9٠-٩⁰-⁹$™®©¤?@~<>«»✿❢•°،‘♔ہ¹ے;✧¢¯☆⊱٭✰❥¨.,’^*()%!\s-]+$') then begin Result := True; end else begin Result := False; end; end; when i check the following string CheckCharsinString('✿شـ❢ـوكـ❢ـ Dan✿') it always Return False. it should return True sense all that chars i use is in regex pattern . what is my Mistake ? Edited November 1, 2020 by Skullcode Share this post Link to post
FredS 138 Posted November 1, 2020 15 minutes ago, Skullcode said: what is my Mistake ? Use Regex101 to find the issue. 1 Share this post Link to post
Skullcode 0 Posted November 1, 2020 From where this dots came up it is no in the string i posted very weird Share this post Link to post
dummzeuch 1505 Posted November 2, 2020 The regex you posted here got mixed up by the editor/browser. There is no way we can help you based on that code. Do as @FredS suggests: Use a tool to try this regex. Share this post Link to post