In case you missed the announcement: Alteryx One is here, and so is the Spring Release! Learn more about these new and exciting releases here!
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