In case you missed the announcement: The Alteryx One Fall Release is here! Learn more about the new features and capabilities here
ACT NOW: The Alteryx team will be retiring support for Community account recovery and Community email-change requests after December 31, 2025. Make sure to check your account preferences in my.alteryx.com to make sure you have filled out your security questions. Learn more here
Start Free Trial

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.

reading server log file ...looking for specific patterns need to find 1 pattern

Raj_007
8 - Asteroid

Hi, Thanks for your time

I have this log file server log (alteryx server log file) into database tables - In one of the column i have the data like

name: message
value: 78|1|odbc driver version: 03.80
name: message
value: 78|1|1639 records were read from odbc:driver={odbc driver 17 for sql server};
name: message
value: 7|1|1117 records were true and 522 were false
name: message
value: 14|1|522 records were true and 1117 were false

 

This is just 1 pattern i have in one record where the pattern is to find the "records were read from odbc:" and look for the number before it in this example 1639

 

I tried this

 

right(Substring([LOGCOLUMN], FindString([LOGCOLUMN], 'records were read from odbc:')-10,+10),5)   - i have used 5 with right function because it is an example for this pattern and i know - but i cannot hard code, any suggestion please - without hard coding i need toget the value 1639

1 REPLY 1
FrederikE
13 - Pulsar

Hey @Raj_007,

 

Try this RegEx: 

(?<=\|\d\|)(\d+)

 

FrederikE_2-1686289508071.png

 

 

Labels
Top Solution Authors