• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

what does \[\[[a-zA-Z]*\]\] mean?

Explorer ,
May 10, 2006 May 10, 2006

Copy link to clipboard

Copied

REReplace(variables.test, "\[\[[a-zA-Z]*\]\]", "", "ALL")>
can anyone tell me what \[\[[a-zA-Z]*\]\] is? what values will be converted to ""? thanks
TOPICS
Advanced techniques

Views

674

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Advocate , May 10, 2006 May 10, 2006
Normally, [ and ] are special characters in regular expressions. \ escapes them so that they equate to a [ or ] character, rather than a special character.

Votes

Translate

Translate
Advocate ,
May 10, 2006 May 10, 2006

Copy link to clipboard

Copied

\[\[[a-zA-Z]*\]\] is a regular expression.

\[\[ matches "[["
[a-zA-Z]* matches zero or more alpha characters, both upper and lowercase
\]\] matches "]]"

Therefore, the purpose of this regular expression is to remove any instances of [[something]] or [[anything]] or [[]]

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
May 10, 2006 May 10, 2006

Copy link to clipboard

Copied

btw how do you know \[\[ matches "[["?
is there any chart which matches which for a regular expression? thanks

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Mentor ,
May 10, 2006 May 10, 2006

Copy link to clipboard

Copied

You might try Googling regular expressions.....

Regular-Expressions.info

Regular Expression HOWTO

etc. etc.

Phil

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
May 10, 2006 May 10, 2006

Copy link to clipboard

Copied

Normally, [ and ] are special characters in regular expressions. \ escapes them so that they equate to a [ or ] character, rather than a special character.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
May 10, 2006 May 10, 2006

Copy link to clipboard

Copied

LATEST
Don't forget the native CF docs on the subject:

http://livedocs.macromedia.com/coldfusion/7/htmldocs/00000981.htm

--
Adam

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation