It is currently April 25th, 2024, 8:49 am

Substitution Term for "

Get help with creating, editing & fixing problems with skins
MatteoFlash
Posts: 23
Joined: June 26th, 2010, 8:11 am

Re: Substitution Term for "

Post by MatteoFlash »

So, by now, I have to surrender about the idea to substitute quotation marks, is this right?

Thanks for the support
DumbDude1994
Posts: 43
Joined: November 12th, 2009, 2:04 am

Re: Substitution Term for "

Post by DumbDude1994 »

couldn't you just use 2 apostrophes '' looks similar to " right
MatteoFlash
Posts: 23
Joined: June 26th, 2010, 8:11 am

Re: Substitution Term for "

Post by MatteoFlash »

I think they won't be recognized, because in the webpage there are the double quotation marks (") and not two single (' ')
User avatar
Alex2539
Rainmeter Sage
Posts: 642
Joined: July 19th, 2009, 5:59 am
Location: Montreal, QC, Canada

Re: Substitution Term for "

Post by Alex2539 »

He was suggesting that you use them on the other side of the substitution. If you have " returned, you could substitute that into two apostrophes instead of an actual quote.
ImageImageImageImage
MatteoFlash
Posts: 23
Joined: June 26th, 2010, 8:11 am

Re: Substitution Term for "

Post by MatteoFlash »

Uhm.. But I'd want to substitute the quotation marks ("), found in the webpage I'm watching, with nothing, not with other marks.. I just want to delete the marks from the source.

Example Source:
<font color="#000000">Text</font>

Example Destination:
Text

I was already able to delete <font color= , #000000 , > and </font>, then I'd like to delete the two ".

Thank you all :)
poiru
Developer
Posts: 2872
Joined: April 17th, 2009, 12:18 pm

Re: Substitution Term for "

Post by poiru »

MatteoFlash wrote: Example Source:
<font color="#000000">Text</font>

Example Destination:
Tex
Couldn't you just use a RegExp that retuns "Text" only.

E.g.

Code: Select all

<font color.*>(.*)</font>
User avatar
jsmorley
Developer
Posts: 22629
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Substitution Term for "

Post by jsmorley »

I agree that some way to substitute the quote character would be nice, although to be honest I have not ever found the lack to be that big of a problem. You can usually "search around" the quotes and return just the text with regular expressions.
MatteoFlash
Posts: 23
Joined: June 26th, 2010, 8:11 am

Re: Substitution Term for "

Post by MatteoFlash »

poiru wrote:Couldn't you just use a RegExp that retuns "Text" only.

E.g.

Code: Select all

<font color.*>(.*)</font>
[/quote]

It's a wonderful idea! I'll check as soon as I can, but I think it will work :D
MatteoFlash
Posts: 23
Joined: June 26th, 2010, 8:11 am

Re: Substitution Term for "

Post by MatteoFlash »

Uhm, the problem is the following. In the webpage, there can be various kind of terms:

<font color="#...">Text1</font>
<font color="#...">Te</font><font color="#">xt2</font>

So I can't write a generic RegExp to extract the right texts.. Texts with a single color are extracted perfectly, while I'm think about how to extract text with more colors.
poiru
Developer
Posts: 2872
Joined: April 17th, 2009, 12:18 pm

Re: Substitution Term for "

Post by poiru »

MatteoFlash wrote:Uhm, the problem is the following. In the webpage, there can be various kind of terms:

<font color="#...">Text1</font>
<font color="#...">Te</font><font color="#">xt2</font>

So I can't write a generic RegExp to extract the right texts..
Yes you can.

If source is:

Code: Select all

<font color="#...">Text1</font>
<font color="#...">Te</font><font color="#">xt2</font>
Just use:

Code: Select all

RegExp="<font color.*>(.*)</font>.*<font color.*>(.*)</font>.*<font color.*>(.*)</font>"
To return:

Code: Select all

StringIndex1=Text2
StringIndex2=Te
StringIndex3=xt2