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

How to match regex with string?

Enthusiast ,
Oct 01, 2015 Oct 01, 2015

Copy link to clipboard

Copied

I'm following this instruction, ColdFusion Help | REMatchNoCase. So I tried this:

sites = "training-me";

result = REMatchNoCase("/training/", sites);

writeOutput(#result#);

But I kept getting Internal Server Error. Any help is much appreciated.

Views

366

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
Community Expert ,
Oct 02, 2015 Oct 02, 2015

Copy link to clipboard

Copied

LATEST

WriteOutput is for displaying simple values. The documentation you refer to says that the function, reMatchNoCase, returns an array. So you should should use writeDump instead.

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