RegEx Replace TAB - VisualCron - Forum

Community forum

NeilFrost
2022-05-19T10:47:10Z
I'm using Notification tasks to create a log file for success and failure results that is read using VB.net, emailed using HTML and then added to a SQL table to feed our internal MI.

I'm using the following

{REGEX(Replace|
{DATEFORMAT(yyyy-MM-dd'T'HH:mm:ss)}
Failed
{JOB(Active|Name)}
{JOB(Active|LastRun|yyyy-MM-dd'T'HH:mm:ss)}
{JOB(Active|ExecutionTime|hh\:mm\:ss)}
{TASK(PrevTask|StdErr)}
|\r\n| )}


With Success being a similar notification task.

However, the replace character is supposed to be a TAB character (copied and pasted from notepad++ UTF-8 encoding) but it is only adding a space.

This used to work with no issue. OS I've tried it on is Windows 10, 11, Server 2012 and Server 2016 and the copied "Tab" is now interpreted as a space.

How can I use a tab character in the Regex?

The vb.net snippet looks like this

Using TaskLog As New FileIO.TextFieldParser(strSourceFilePath)
      
        TaskLog.Delimiters = New String() {vbTab}
        TaskLog.TrimWhiteSpace = True
        TaskLog.HasFieldsEnclosedInQuotes = False


and uses vbTab elsewhere in the code.
ErikC
2022-05-19T11:01:43Z
Hi,

Not into vb.net here, but this might be missing? :

TaskLog.TextFieldType = FileIO.FieldType.Delimited


Regards
Erik
Uses Visualcron since 2006.
Scroll to Top