Skip to main content
2Charlie
Inspiring
Oct 1, 2015 2:15 PM UTC
Question

How to match regex with string?

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.

This topic is closed to new replies. Start a new post to keep the conversation going.

1 reply

BKBK
Community Expert
Community Expert
Oct 2, 2015 7:22 AM UTC

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