Forum Discussion

KevinFord's avatar
KevinFord
New Contributor
2 years ago
Solved

SQL Insert / SQL Server Execute Snaps

We have a process today that does a SQL insert into a transactional database and returns the ID value for use in later steps.  We have tried the SQL INSERT SNAP and ID is not returned.  Also tried th...
  • koryknick's avatar
    4 years ago

    It’s the newline character in the string that is causing the issue. The dot notation for character matching in regex does not match newlines. After a bit of thought, we can also simplify the result by using the regex group capture syntax. Try this:

    $notes.replaceAll('\n','').replace(/.*#IF:(.{9}).*/g, '$1')