SOLVED: Need help in getting a relevance created for pulling specific keywordspulled from a text file

The highlighted keywords are variable and keeps on changing for each machines. Need help in getting this data pulled using relevance.

Just a note to all: When asking for help parsing a text file, please post a sample copy as text, and use the “preformatted text” button (it looks like </> in the editor) to avoid any reformatting.

I haven’t tested the following, but give it a try:

(following text of first ":" of lines whose (it contains "database manager instance is:") of it, (following text of first "BACKUP DB" of it, substrings between "'" of it) of lines whose (it starts with "BACKUP DB") of it, following text of first ":" of lines whose (it starts with "Backup successful." of it) of file "path\to\my\backuplog.txt"

1 Like

does it work when you use a closing bracket ?

The following works for me, the file has a line like yours.

Q: lines of file "/tmp/hello"
A: BACKUP DB FOUNTAIN ONLINE TO 'E:\db2backup' COMPRESS INCLUDE
T: 2157

Q:  substrings between "'" of lines whose ( it contains "BACKUP DB") of file "/tmp/hello"
A: E:\db2backup
T: 202

Is it the singular expression refers to non-unique object error ?

This means that you are getting more than one item returned from the relevance - you will have to try out your relevance and find out which items is returning too many items.

See this topic for help with errors.

This pretty easy!

(If it contains “current database” then following text of last OF Lines whose (it contains “The current database manager instance is” or it contains “COMPRESS INCLUDE LOGS WITHOUT PROMPTING”) of file “file-path”

I restored your original post back to the way it was. If need to redact the image, that is fine, but please provide a copy of text within the file in your post with the text you need to redact replaced with fake text.

If you take away the original post info, then it messes up the thread and prevents it from being useful to others.

If you copy and paste the text as is and save it, even if the forum software messes up the look of it, the moderators can fix it for you, or anyone can tell you to highlight the text and then click the </> button.