RegEx is working on MacOS but not on Windows

Hey guys,

i got a problem that my RegEx is working with MacOS text but not with Windows text.

If I compare the two texts they are exactly the same.

The problem is that i cant debug it on Windows.

Is anyone have some tips or things i may consider?

My implementation of the RegEx is the same like on the Doc:

Var rg As New RegEx
dim myMatch As RegExMatch
rg.SearchPattern = param.pattern

For Each s As String In toTest
  myMatch = rg.Search(s.Trim)
  If myMatch = Nil Then
    found_errors = True
  end if

toTest is just an Array of distinct Strings to test with the regeEx Pattern

Thank you!

Mac / Windows / Linux have different line endings.

What can happen is that Windows line endings might not be recognised on Mac and Linux, and vice versa.

My guess is you did not make sure that the line endings are recognised on the other platform. Have a read through the documentation on EndOfLine, especially the ReplaceLineEndings function.

So your text might be split into an array on one platform but not the other.

Hello Markus,

thats also a known issue for me. So i test only on simple strings. There cant be LineEndings in this, but i will check it now anyways.

Any other suggestions?

Make a demo project that others can download and play with - otherwise it is too much guessing and a waste of time for everyone involved.

Especially what the output on each platform is - at the moment we know exactly nothing.

thank you @Markus_Winter for trying to help me, found out that RegEx is not the problem

so this topic is wrong, sorry for this

We’ve all been there, so no worries :wink: