⚲
Project
General
Profile
Sign in
Register
Home
Projects
Help
Search
:
Ruby 1.8
All Projects
Ruby
»
Ruby 1.8
Overview
Activity
Roadmap
Issues
Wiki
Like
Download (260 Bytes)
Bug #557
ยป re.c
regular expression C example -
WimYedema (Wim Yedema)
, 09/10/2008 09:15 PM
#include
<sys/types.h>
#include
<regex.h>
int
main
(
void
)
{
regex_t
preg
;
regmatch_t
pmatch
;
regcomp
(
&
preg
,
"foo|footer"
,
REG_EXTENDED
);
regexec
(
&
preg
,
"footer"
,
1
,
&
pmatch
,
0
);
printf
(
"match: %d, %d
\n
"
,
pmatch
.
rm_so
,
pmatch
.
rm_eo
);
return
0
;
}
(1-1/1)
Loading...