Function `ExecRegExpr` in unit `uregexpr` will not parse some complicated regex patterns correctly, such as a UUID pattern.
Summary
Function ExecRegExpr in unit uregexpr can't recognize a correct UUID string such as 1f20d5ba-3618-432e-9ba6-f050dc12602d with a correct UUID pattern string such as ^[\da-f]{8}(-[\da-f]{4}){3}-[\da-f]{12}$ or ^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$ on AARCH64 platform such as Apple M1 Ultra CPU. However, it behaves normally at least on x86-64 platform.
System Information
- Operating system: MacOS 14.6.1 (Sonoma)
- Processor architecture: AARCH64
- Compiler version: trunk, stable, 3.2.2, fixes, and fixes-3.2
- Device: Computer
Steps to reproduce
- Open Lazarus, create a GUI Application.
- Put a button named Button1 on Form1.
- Double click Button1 and add the code below:
Procedure TForm1.Button1Click(Sender: TObject);
Begin
If ExecRegExpr('^[\da-f]{8}(-[\da-f]{4}){3}-[\da-f]{12}$',
'1f20d5ba-3618-432e-9ba6-f050dc12602d') Then
ShowMessage('1: Match')
Else
ShowMessage('1: Not match');
If ExecRegExpr('^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$',
'1f20d5ba-3618-432e-9ba6-f050dc12602d') Then
ShowMessage('2: Match')
Else
ShowMessage('2: Not match');
End;
- Compile and run the application.
- Click Button1.
Example Project
What is the current bug behavior?
- For the first message box, it says:
1: Not match. - For the second message box, it says:
2: Not match.
What is the expected (correct) behavior?
- For the first message box, it should say:
1: Match. - For the second message box, it should say:
2: Match.