Lisa Ann
Lisa Ann

Reputation: 3485

Replace “” in AutoHotkey

This is a weird kind of double quotes that I'm having to deal with from a text file:

enter image description here

Here's the text the way my clipboard manages it:

II=" alt="“”" />][N

The point is: I am trying to use StrReplace() to detect that string and replace it, but it doesn't find the content that my clipboard gets by copy & paste.

This doesn't find anything to replace by foo:

fixedContent := StrReplace(myContent, "II="" alt=""“”"" />][N", "foo")

It seems that “” is not the same as enter image description here.

Maybe I have to use a special character?

Upvotes: 0

Views: 1449

Answers (2)

user70960
user70960

Reputation: 326

The characters “” the same as enter image description here, it's just different fonts.

myContent = <IT="" alt="“”" />][Nebula]
find = IT="" alt="“”" />][N
replaceWith = foo
fixedContent := StrReplace(myContent, find, replaceWith)
msgbox % fixedContent

Upvotes: 1

Rog&#233;rio Dec
Rog&#233;rio Dec

Reputation: 841

Try this

fixedContent:=StrReplace(myContent, "“”", "foo")

Upvotes: 0

Related Questions