0

What are my options if I want to use regular expression matching in a Windows NT kernel driver that is written in C?

I don't think Microsoft Windows has a ready made API for this, but correct me if I'm wrong. I'm assuming that I'll need to use an external library or write my own parser in C.

This is for a commercial project, so GPL open source is not an option.

Thanks,

AlexPi
  • 539
  • 5
  • 16
  • Check https://msdn.microsoft.com/en-us/library/windows/hardware/ff546850(v=vs.85).asp , its not full featured regex though. – Rohan Sep 25 '16 at 05:36

1 Answers1

6

As far as I know, there is no support for regular expressions in the Windows kernel. So, your best option is probably to use a library that is written in C and has no, or very few, dependencies. That allows you to port it into the kernel world easily.

Such library might be: https://github.com/kimperator/T-Rex

I think its license permits commercial uses without any "negative" effects.

Look also at the implementation since it is not as effective as it might be. But it still may suit your needs.

Martin Drab
  • 667
  • 4
  • 6