Modify

Opened 18 years ago

Closed 18 years ago

#20 closed Bug (Rejected)

[:class:] in regex

Reported by: anonymous Owned by:
Milestone: Component: AutoIt
Version: 3.2.10.0 Severity:
Keywords: regex, regexp, StringRegExpReplace Cc:

Description

StringRegExp says that [:space:] is recognized.

But this one works:

StringRegExpReplace($s,"(re:|fw:|fwd:)\s*","")

but these didn't:

StringRegExpReplace($s,"(re:|fw:|fwd:)[:space:]*","")
StringRegExpReplace($s,"
(re:|fw:|fwd:)([:space:])*","")

Attachments (0)

Change History (2)

comment:1 by Xenobiologist, 18 years ago

Hi,

works for me:

Global $s = "H e l l o"
ConsoleWrite(StringRegExpReplace($s,"\s","") & @CRLF)
ConsoleWrite(StringRegExpReplace($s,"[[:space:]]","")  & @CRLF)

So long,

Mega

in reply to:  description comment:2 by J-Paul Mesnage, 18 years ago

Resolution: rejected
Status: newclosed

Replying to anonymous:

StringRegExp says that [:space:] is recognized.

But this one works:

StringRegExpReplace($s,"(re:|fw:|fwd:)\s*","")

but these didn't:

StringRegExpReplace($s,"(re:|fw:|fwd:)[:space:]*","")
StringRegExpReplace($s,"
(re:|fw:|fwd:)([:space:])*","")

as stated by Mega there is no error as the [:space:] must me included in []. It is described in the doc

Modify Ticket

Action
as closed The ticket will remain with no owner.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.