How to match regex with string?

Engaged ,
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

312

Likes

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
Adobe Community Professional ,
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.

Likes

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