Hi, I am working on an idea for a skin.
Part of it uses the afterburner.dll and I am trying to parse the GPU name in a way that will recognise almost any GPU.
I know that \d captures a digit, and that \w captures a character (I think so anyway)
Is there a capture for a whole word of indeterminable length? e.g. backslash "something"?
I am trying to escape from a string after a whole word - and also before another whole word.
To clarify; I am using InlineSetting/Pattern to modify the angle of text that displays the GPU name in two separate lines with different Angles.
Thanks
It is currently April 18th, 2024, 2:17 pm
RegExp Perl Friendly Characters [Solved]
-
- Posts: 943
- Joined: May 7th, 2016, 7:32 am
RegExp Perl Friendly Characters [Solved]
Last edited by Mor3bane on February 21st, 2017, 8:55 pm, edited 2 times in total.
My DevArt Gallery
There are many ways to be different - there is only one way to be yourself - be amazing at it
The law of averages says what it means; even if you get everything right, you will get something wrong. Therefore; self managing error trapping initiates another set of averages - amongst the errors, some of them will not be errors, instead those instances will appear to be "luck". One cannot complain of the 'appearance' of 'infinite regress of causation', even if it does not have a predictable pattern, only that it requires luck to achieve.
There are many ways to be different - there is only one way to be yourself - be amazing at it
The law of averages says what it means; even if you get everything right, you will get something wrong. Therefore; self managing error trapping initiates another set of averages - amongst the errors, some of them will not be errors, instead those instances will appear to be "luck". One cannot complain of the 'appearance' of 'infinite regress of causation', even if it does not have a predictable pattern, only that it requires luck to achieve.
-
- Posts: 826
- Joined: November 20th, 2012, 11:58 pm
Re: RegExp Perl Friendly Characters
Can you post some example please?
You can use ^(.*)$ for capture anything (no matter the length or if there are letters or digits)
You can use ^(.*)$ for capture anything (no matter the length or if there are letters or digits)
-
- Posts: 943
- Joined: May 7th, 2016, 7:32 am
Re: RegExp Perl Friendly Characters
Please see previous post - I edited it with more info during your replyFreeRaider wrote:Can you post some example please?
You can use ^(.*)$ for capture anything (no matter the length or if there are letters or digits)
I am using the Inline options to make the relevant words be transparent with Color | 0,0,0,0
This is what the relevant meters look like :
Code: Select all
[MeterGPUName1]
Meter=String
MeasureName=MeasureGPUName
FontColor=#ColorOffset#
FontSize=45
FontFace=#Font#
AntiAlias=1
StringAlign=Left
X=110
Y=273
W=280
ClipString=2
Text=%1
InlineSetting=Color | #ColorX#
InlinePattern=GeForce (.*)
Angle=25.25
Group=GPUHUD
Hidden=0
DynamicVariables=1
[MeterGPUName2]
Meter=String
MeasureName=MeasureGPUName
FontColor=#ColorOffset#
FontSize=45
FontFace=#Font#
AntiAlias=1
StringAlign=Left
X=100
Y=278
W=280
ClipString=2
Text=%1
InlineSetting=Color | #ColorX#
InlinePattern=^(.*) GTX
Angle=25.17
Group=GPUHUD
Hidden=0
DynamicVariables=1
Last edited by Mor3bane on February 21st, 2017, 8:39 pm, edited 1 time in total.
My DevArt Gallery
There are many ways to be different - there is only one way to be yourself - be amazing at it
The law of averages says what it means; even if you get everything right, you will get something wrong. Therefore; self managing error trapping initiates another set of averages - amongst the errors, some of them will not be errors, instead those instances will appear to be "luck". One cannot complain of the 'appearance' of 'infinite regress of causation', even if it does not have a predictable pattern, only that it requires luck to achieve.
There are many ways to be different - there is only one way to be yourself - be amazing at it
The law of averages says what it means; even if you get everything right, you will get something wrong. Therefore; self managing error trapping initiates another set of averages - amongst the errors, some of them will not be errors, instead those instances will appear to be "luck". One cannot complain of the 'appearance' of 'infinite regress of causation', even if it does not have a predictable pattern, only that it requires luck to achieve.
-
- Moderator
- Posts: 1387
- Joined: April 11th, 2013, 8:08 pm
- Location: Italy
Re: RegExp Perl Friendly Characters
If the text line is as you've posted, you can try this:
^(.*) .* and ^.* (.*)
^(.*) .* and ^.* (.*)
-
- Posts: 943
- Joined: May 7th, 2016, 7:32 am
Re: RegExp Perl Friendly Characters
Thanks fanpaolofonpaolo wrote:If the text line is as you've posted, you can try this:
^(.*) .* and ^.* (.*)
But those expressions only split the second line - not the whole three word string.
Ideally it would capture the GPU name and split it for the model number on the second line.
So, this InlinePattern=^(.*) \w+ .* works perfectly for showing the second line but the first word is gone then
My DevArt Gallery
There are many ways to be different - there is only one way to be yourself - be amazing at it
The law of averages says what it means; even if you get everything right, you will get something wrong. Therefore; self managing error trapping initiates another set of averages - amongst the errors, some of them will not be errors, instead those instances will appear to be "luck". One cannot complain of the 'appearance' of 'infinite regress of causation', even if it does not have a predictable pattern, only that it requires luck to achieve.
There are many ways to be different - there is only one way to be yourself - be amazing at it
The law of averages says what it means; even if you get everything right, you will get something wrong. Therefore; self managing error trapping initiates another set of averages - amongst the errors, some of them will not be errors, instead those instances will appear to be "luck". One cannot complain of the 'appearance' of 'infinite regress of causation', even if it does not have a predictable pattern, only that it requires luck to achieve.
-
- Posts: 943
- Joined: May 7th, 2016, 7:32 am
Re: RegExp Perl Friendly Characters
So this:
Looks like this:
Code: Select all
[MeterGPUName1]
Meter=String
MeasureName=MeasureGPUName
FontColor=#ColorOffset#
FontSize=45
FontFace=#Font#
AntiAlias=1
StringAlign=Left
X=110
Y=273
W=280
ClipString=2
Text=%1
InlineSetting=Color | #ColorX#
InlinePattern=GeForce (.*)
Angle=25.25
Group=GPUHUD
Hidden=0
DynamicVariables=1
[MeterGPUName2]
Meter=String
MeasureName=MeasureGPUName
FontColor=#ColorOffset#
FontSize=45
FontFace=#Font#
AntiAlias=1
StringAlign=Left
X=100
Y=278
W=280
ClipString=2
Text=%1
InlineSetting=Color | #ColorX#
InlinePattern=^(.*) \w+ .*
Angle=25.17
Group=GPUHUD
Hidden=0
DynamicVariables=1
My DevArt Gallery
There are many ways to be different - there is only one way to be yourself - be amazing at it
The law of averages says what it means; even if you get everything right, you will get something wrong. Therefore; self managing error trapping initiates another set of averages - amongst the errors, some of them will not be errors, instead those instances will appear to be "luck". One cannot complain of the 'appearance' of 'infinite regress of causation', even if it does not have a predictable pattern, only that it requires luck to achieve.
There are many ways to be different - there is only one way to be yourself - be amazing at it
The law of averages says what it means; even if you get everything right, you will get something wrong. Therefore; self managing error trapping initiates another set of averages - amongst the errors, some of them will not be errors, instead those instances will appear to be "luck". One cannot complain of the 'appearance' of 'infinite regress of causation', even if it does not have a predictable pattern, only that it requires luck to achieve.
-
- Posts: 943
- Joined: May 7th, 2016, 7:32 am
Re: RegExp Perl Friendly Characters
Ok, fonpaolo
This seems to work right - derived from your provided recommendations:
Thank You VERY MUCH
This seems to work right - derived from your provided recommendations:
Code: Select all
[MeterGPUName1]
Meter=String
MeasureName=MeasureGPUName
FontColor=#ColorOffset#
FontSize=45
FontFace=#Font#
AntiAlias=1
StringAlign=Left
X=110
Y=273
W=280
ClipString=2
Text=%1
InlineSetting=Color | #ColorX#
InlinePattern=^\w+ (.*)
Angle=25.25
Group=GPUHUD
Hidden=0
DynamicVariables=1
[MeterGPUName2]
Meter=String
MeasureName=MeasureGPUName
FontColor=#ColorOffset#
FontSize=45
FontFace=#Font#
AntiAlias=1
StringAlign=Left
X=100
Y=278
W=280
ClipString=2
Text=%1
InlineSetting=Color | #ColorX#
InlinePattern=^(.*) \w+ .*
Angle=25.17
Group=GPUHUD
Hidden=0
DynamicVariables=1
My DevArt Gallery
There are many ways to be different - there is only one way to be yourself - be amazing at it
The law of averages says what it means; even if you get everything right, you will get something wrong. Therefore; self managing error trapping initiates another set of averages - amongst the errors, some of them will not be errors, instead those instances will appear to be "luck". One cannot complain of the 'appearance' of 'infinite regress of causation', even if it does not have a predictable pattern, only that it requires luck to achieve.
There are many ways to be different - there is only one way to be yourself - be amazing at it
The law of averages says what it means; even if you get everything right, you will get something wrong. Therefore; self managing error trapping initiates another set of averages - amongst the errors, some of them will not be errors, instead those instances will appear to be "luck". One cannot complain of the 'appearance' of 'infinite regress of causation', even if it does not have a predictable pattern, only that it requires luck to achieve.
-
- Moderator
- Posts: 1387
- Joined: April 11th, 2013, 8:08 pm
- Location: Italy
Re: RegExp Perl Friendly Characters
Sorry, I'm confused... Correct me if I'm wrong, but do you want to split "Geforce GTX 960" in two parts, "Geforce" and "GTX 960"?
If so, using my first snippet will pick "Geforce" and ignore the rest, my secon snippet will pick the other part.
Then, you don't need to create two separate meters to display the text, just use:
If so, using my first snippet will pick "Geforce" and ignore the rest, my secon snippet will pick the other part.
Then, you don't need to create two separate meters to display the text, just use:
Code: Select all
InlineSetting=xxx
InlinePattern=yyy
InlineSetting2=xxy
InlinePattern2=yyz
-
- Posts: 943
- Joined: May 7th, 2016, 7:32 am
Re: RegExp Perl Friendly Characters
Ok -you are most certainly correct. However, setting the Angle will require another Meter due to the fact that Inline options do not recognise the Angle parameter.fonpaolo wrote:Sorry, I'm confused... Correct me if I'm wrong, but do you want to split "Geforce GTX 960" in two parts, "Geforce" and "GTX 960"?
If so, using my first snippet will pick "Geforce" and ignore the rest, my secon snippet will pick the other part.
Then, you don't need to create two separate meters to display the text, just use:Code: Select all
InlineSetting=xxx InlinePattern=yyy InlineSetting2=xxy InlinePattern2=yyz
I found the Media Magic thingy for perspective text, but that is a curse on the Earth due to installation difficulties.
So setting the Angle became the reasonable option.
My DevArt Gallery
There are many ways to be different - there is only one way to be yourself - be amazing at it
The law of averages says what it means; even if you get everything right, you will get something wrong. Therefore; self managing error trapping initiates another set of averages - amongst the errors, some of them will not be errors, instead those instances will appear to be "luck". One cannot complain of the 'appearance' of 'infinite regress of causation', even if it does not have a predictable pattern, only that it requires luck to achieve.
There are many ways to be different - there is only one way to be yourself - be amazing at it
The law of averages says what it means; even if you get everything right, you will get something wrong. Therefore; self managing error trapping initiates another set of averages - amongst the errors, some of them will not be errors, instead those instances will appear to be "luck". One cannot complain of the 'appearance' of 'infinite regress of causation', even if it does not have a predictable pattern, only that it requires luck to achieve.
-
- Moderator
- Posts: 1387
- Joined: April 11th, 2013, 8:08 pm
- Location: Italy
Re: RegExp Perl Friendly Characters [Solved]
Oh, sorry, never used "Angle" with Inline... I used it for almost everything but "Angle".