What I mean is that instead of "MSI B350 PC MATE (MS-7A34) (Nuvoton NCT6795D)" for the motherboard name I just want "MSI B350 PC MATE", using a regex substitution. This stuff is displayed with HWinfo plugin.
alexks_101 wrote:What I mean is that instead of "MSI B350 PC MATE (MS-7A34) (Nuvoton NCT6795D)" for the motherboard name I just want "MSI B350 PC MATE", using a regex substitution. This stuff is displayed with HWinfo plugin.
Ok, add the following two options to the measure which returns the string:
Another one sorry, what should I do to have "ST1000DM010-2EP102" instead of "Drive: ST1000DM010-2EP102 (Z9AG4E2F)"?
I'm able to remove the "Drive:" but can't get rid of the " (Z9AG4E2F)".
Regex is just a nightmare for me, I can't stand it, I remember when I had to tweak some htaccess files
alexks_101 wrote:Another one sorry, what should I do to have "ST1000DM010-2EP102" instead of "Drive: ST1000DM010-2EP102 (Z9AG4E2F)"?
I'm able to remove the "Drive:" but can't get rid of the " (Z9AG4E2F)".
What is important is to keep in mind that the parenthesis are reserves characters in regular expressions and as such, you have to escape them, using a backslash (\). That's why I put a such character in both posted substitutions, before the parenthesis which exist in the expression.
alexks_101 wrote:Regex is just a nightmare for me, I can't stand it, I remember when I had to tweak some htaccess files
Yeah I know about escaping characters, but the problem regarding regex is the whole syntax.
And I must be dumb because I'm used to programming languages and other related stuff.
alexks_101 wrote:but the problem regarding regex is the whole syntax.
And I must be dumb because I'm used to programming languages and other related stuff.
I'm glad if I helped.
No, you're not dumb at all, but the regular expressions have a logic which have to get used to. Probably a programming language background can help, but you have to invest an effort to get used to it.