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

How to match regex with string?

Enthusiast ,
Oct 01, 2015 Oct 01, 2015

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.

423
Translate
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
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.

Translate
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