Text Helper Bug?

I have encountered a strange problem. When using regular expression extraction, the returned value is missing the latter part compared to the input value (although it works fine when I test it separately using a text helper). Could someone from the technical team please take a look?
input:

{
  "text": "2024-07-10 16:39We primarily match models based on power and flow rate. For models above 110W, they have the appearance shown below on the picture; for those below 110W, they have the appearance shown above on the picture.\nChoose Color\nattachmentdownload微信截图_20240710163729.pngJ已读",
  "expression": "(.*?)(\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2})(.*)"
}

output:

[
  "2024-07-10 16:39We primarily match models based on power and flow rate. For models above 110W, they have the appearance shown below on the picture; for those below 110W, they have the appearance shown above on the picture.",
  "",
  "2024-07-10 16:39",
  "We primarily match models based on power and flow rate. For models above 110W, they have the appearance shown below on the picture; for those below 110W, they have the appearance shown above on the picture."
]

Hello @Johnny_Wong ,

Are you using code piece where you are facing this problem? It’s possible that the regex is not properly handling text after the newline character “\n”.

Not, this flow dont have any code piece

Try using /(.*?)(\d{4}-\d{2}-\d{2} \d{2}:\d{2})([\s\S]*)/ expression, it will capture text even after newline characters.

1 Like

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.