remove a special sign

Get help with using AutoHotkey and its commands and hotkeys
Yaosr
Posts: 45
Joined: 04 Nov 2017, 04:59

remove a special sign

17 May 2018, 12:48

Hey there,
I would like to remove a sign from the copied content, I normally use it to remove HTML tags however in this case I need to remove the following:
#sometexthere


How can I get a code like that to be working? I have something similar that removes HTML tags:

Code: [Select all] [Expand] [Download] GeSHi © Codebox Plus



As I understand the command to remove HTML tags is in here:

Code: [Select all] [Download] GeSHi © Codebox Plus

processedString := RegExReplace(string,"<.*?>")


Does anybody have any idea how to change the code so it removes "#aaa" or "#anything" or "#blahblah"?

Thanks in advance!
swagfag
Posts: 494
Joined: 11 Jan 2017, 17:59

Re: remove a special sign

17 May 2018, 13:28

<.*?>|#\w*?\b

Untested
User avatar
TLM
Posts: 1220
Joined: 01 Oct 2013, 07:52

Re: remove a special sign

17 May 2018, 13:37

I suggest using a htmlfile object to parse and edit html. For instance:

Code: [Select all] [Expand] [Download] GeSHi © Codebox Plus

Using the object is more reliable than trying to replace/remove tags by string.
Image Image Image

Return to “Ask For Help”

Who is online

Users browsing this forum: andrewh, scruffygamer and 62 guests