develooper Front page | perl.perl5.porters | Postings from January 2003

Checking if regex matches from XS

Thread Next
Dave Rolsky
January 18, 2003 17:53
Checking if regex matches from XS
Message ID:
I've read the Jenness/Cozens book and the various perldocs on XS, but I
can find no hint of how to use the regex engine from XS.

What I want to do is accept an SV containing either qr/.../ or regular
string, and then check whether the specified regex matches the contents of
another SV.

If someone knows of a module that does this in XS, I'd be happy to be
pointed at it.  Otherwise more explicit hints are welcome ;)

Poking through the internals, I see the Perl_pregexec function in
regexec.c, which seems like a likely start, but what the heck are the
arguments?  What's screamer?  And how do I turn an SV into a regexp



House Absolute Consulting

Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About