Unsolved Need Regex Help
-
@pete-s I can't use grep for this specific function as I'm limited regex or known string searching only through BrightGauge.
-
The regex inverse match is
\b(?!:Microsoft|Libre|MyTax)\b
But this will list literally every other piece of software found, and not the exclusions of "I've not found this software on "Bobs-pc" or on "Sarahs-pc"
-
@dustinb3403 said in Need Regex Help:
@pete-s I can't use grep for this specific function as I'm limited regex or known string searching only through BrightGauge.
If you can't make scripts to massage the data in BrightGauge, I don't think it's possible.
-
@pete-s said in Need Regex Help:
@dustinb3403 said in Need Regex Help:
@pete-s I can't use grep for this specific function as I'm limited regex or known string searching only through BrightGauge.
If you can't make scripts to massage the data in BrightGauge, I don't think it's possible.
That's kind of what I'm feeling. . . but hopes and prayers I can pull something out of my hat. . .
-
Is there anyway to pull the data out so you can use the tools you want?
-
@dashrender said in Need Regex Help:
Is there anyway to pull the data out so you can use the tools you want?
I want to use BrightGauge because I dont want to have to handle the data on an on-going basis. But yes I could export the data, and filter it down to show me just the "These don't have that" in excel which, that is actually already done.
But its still incredibly annoying to have to review.
The end goal is to have a list of systems that are simply lacking one piece of software or another, and to not have to view everything other piece of software with it. So that the lacking software can be installed.
-
@dustinb3403 said in Need Regex Help:
@dashrender said in Need Regex Help:
Is there anyway to pull the data out so you can use the tools you want?
I want to use BrightGauge because I dont want to have to handle the data on an on-going basis. But yes I could export the data, and filter it down to show me just the "These don't have that" in excel which, that is actually already done.
But its still incredibly annoying to have to review.
The end goal is to have a list of systems that are simply lacking one piece of software or another, and to not have to view everything other piece of software with it. So that the lacking software can be installed.
You could pull the data same as BrightGauge does, have a script do something to it and then send it into BrightGauge but it's another level of difficulty.
Have you contacted support? They might have another way of accomplishing it.
-
-
@dustinb3403 said in Need Regex Help:
I need some help with some regex,
Every tool has its own regex. Which regex do you need?
-
@scottalanmiller PostreSQL regex
-
So nothing?
-
@dustinb3403 said in Need Regex Help:
@scottalanmiller PostreSQL regex
Oh wow, I've never used regex in a database before. No idea of that syntax or where/when you'd use it.
-
@scottalanmiller said in Need Regex Help:
@dustinb3403 said in Need Regex Help:
@scottalanmiller PostreSQL regex
Oh wow, I've never used regex in a database before. No idea of that syntax or where/when you'd use it.
It either used for string manipulation or string matching.
From the top of my head with syntax errors included.
For example manipulating strings (convert email to domain name)
select name, regexp_match(email,'.+@(.+)') as domain from customers
For example matching to a simple regexp (all customers that have the has John somewhere in their name):
select * from customers where customer_name ~ 'John'
-
@dustinb3403 said in Need Regex Help:
@scottalanmiller PostreSQL regex
It's easy to solve this problem with SQL - if that is a possibility.
You just need to use a subquery.I'm assuming a table that contains one column with computer name and another with software installed. One row for each software installed.
For example a query to find all computers that have the software installed:
select computer_name from yourtable where software_installed='Microsoft' or software_installed='Anti-virus' group by computer_name
Now we'll use that as a subquery to show all the computers that doesn't have the software installed:
select computer_name from yourtable where computer_name<>( select computer_name from yourtable where software_installed='Microsoft' or software_installed='Anti-virus' group by computer_name ) group by computer_name
The
group by
is to show a computer name just one time, even if you have several rows that contains that name.Note: Syntax errors probably included in my examples.
-
@pete-s Thank you for the help, unfortunately it appears I'm limited to PostgresSQL regex like below or directly selecting the installed software from the list of thousands of items.
\b(?!:Microsoft|Anti-Virus)\b
I have no options for a subquery, at least that I can see at the moment.
-
@dustinb3403 said in Need Regex Help:
@pete-s Thank you for the help, unfortunately it appears I'm limited to PostgresSQL regex like below or directly selecting the installed software from the list of thousands of items.
I have no options for a subquery, at least that I can see at the moment.
Yeah, well you're not going to find a regex solution. Simply because you need to look at several rows of information to determine if the computer has software or not. That's why it's not going to work.
If you could put have all the software into one column then you could use regex to find the rows that doesn't have the software installed. So if you had a string with "Microsoft,Libre,MyTax,Anti-virus " you could use regex on that and it would work fine.
-
@pete-s yeah that is what I'm feeling as well. . . sadly. This really needs to be somehow capable with the tooling, even if I'm not able to implement it.
-
@dustinb3403 said in Need Regex Help:
@pete-s yeah that is what I'm feeling as well. . . sadly. This really needs to be somehow capable with the tooling, even if I'm not able to implement it.
I haven't heard of BrightGauge before. Maybe it's big in the market, I don't know.
Regardless of that, it looks very capable on their website but that's because that's what marketing does - makes things look good.
The actual technical capability of the product is unknown until it's put to use. In your case unfortunately it looks like the product can't get the job done.
Maybe you're trying to hammer with a screwdriver or the hammer you have is just crap. In either case the support should be able to help you.
-
@pete-s said in Need Regex Help:
@dustinb3403 said in Need Regex Help:
@pete-s yeah that is what I'm feeling as well. . . sadly. This really needs to be somehow capable with the tooling, even if I'm not able to implement it.
I haven't heard of BrightGauge before. Maybe it's big in the market, I don't know.
Regardless of that, it looks very capable on their website but that's because that's what marketing does - makes things look good.
The actual technical capability of the product is unknown until it's put to use. In your case unfortunately it looks like the product can't get the job done.
Maybe you're trying to hammer with a screwdriver or the hammer you have is just crap. In either case the support should be able to help you.
It very well may not be up to task, or it could very well be my limited use of the tool and familiarity with it.
-
@dustinb3403 said in Need Regex Help:
@pete-s Thank you for the help, unfortunately it appears I'm limited to PostgresSQL regex like below or directly selecting the installed software from the list of thousands of items.
\b(?!:Microsoft|Anti-Virus)\b
I have no options for a subquery, at least that I can see at the moment.
Are you able to access the database outside of whatever tooling they provide? Being PostgreSQL, you should be able to. Get to the point where you can write your own query and go from there (you can do most anything with the data you want then.)