REGEX(3)	UNIX ¥é¥¤¥Ö¥é¥ê	REGEX(3)

[Ì¾Á°]
regex, wre_comp, wre_exec - ÆüËÜ¸ìÀµµ¬É½¸½½èÍý´Ø¿ô

[·Á¼°]
#include <nje/nje.h>

char *wre_comp(s)
char *s;

wre_exec(s)
char *s;

[µ¡Ç½ÀâÌÀ]       
wre_comp ¤ÏÊ¸»úÎó¤ò¥Ñ¥¿¡¼¥ó¥Þ¥Ã¥Á¥ó¥°¤ËÅ¬¤·¤¿ÆâÉô·Á¼°¤ËÊÑ´¹¤·¤Þ¤¹¡£wre_exec ¤Ï¡¢°ú¿ô¤ÎÊ¸»úÎó¤¬¡¢wre_comp ¤ËºÇ¸å¤ËÅÏ¤µ¤ì¤¿Ê¸»úÎó¤ËÂÐ¤·¤Æ°ìÃ×¤¹¤ë¤«¤É¤¦¤«¸¡ºº¤·¤Þ¤¹¡£

wre_comp ¤ÏÊ¸»úÎó s ¤ÎÊÑ´¹¤ËÀ®¸ù¤·¤¿¾ì¹ç¤Ë 0 ¤òÊÖ¤·¤Þ¤¹¡¨
¤½¤¦¤Ç¤Ê¤¤¾ì¹ç¤Ë¤Ï¡¢¥¨¥é¡¼¥á¥Ã¥»¡¼¥¸¤ò´Þ¤àÊ¸»úÎó¤òÊÖ¤·¤Þ¤¹¡£
wre_comp ¤Ë 0 ¤Þ¤¿¤Ï¥Ì¥ëÊ¸»úÎó¤¬ÅÏ¤µ¤ì¤¿¾ì¹ç¤Ë¤Ï¡¢ºÇ¸å¤ËÊÑ´¹¤·¤¿Àµµ¬É½¸½¤ò¤½¤Î¤Þ¤ÞÊÑ¹¹¤»¤º¤ËÊÖ¤·¤Þ¤¹¡£

wre_exec ¤Ï 1, 0 ¤Þ¤¿¤Ï -1 ¤òÊÖ¤·¤Þ¤¹:
1 ¤òÊÖ¤¹¤Î¤Ï¡¢Ê¸»úÎó s ¤¬ºÇ¸å¤ËÊÑ´¹¤µ¤ì¤¿Àµµ¬É½¸½¤Ë°ìÃ×¤¹¤ë¾ì¹ç¡¨0 ¤òÊÖ¤¹¤Î¤Ï¡¢Ê¸»úÎó s ¤¬ºÇ¸å¤ËÊÑ´¹¤µ¤ì¤¿Àµµ¬É½¸½¤Ë°ìÃ×¤·¤Ê¤¤¾ì¹ç¡¨-1 ¤òÊÖ¤¹¤Î¤Ï¡¢ÊÑ´¹¤µ¤ì¤¿Àµµ¬É½¸½¤¬ÉÔÀµ¤Ê¡Ê¤¹¤Ê¤ï¤Á¡¢ÆâÉô¥¨¥é¡¼¤ÎÈ¯À¸¤ò¼¨¤¹¡Ë¾ì¹ç¤Ç¤¹¡£

wre_comp ¤ª¤è¤Ó wre_exec ¤ËÅÏ¤µ¤ì¤ëÊ¸»úÎó¤Ï¡¢²þ¹ÔÊ¸»ú¤¬ºÇ¸å¤Ë»Ä¤Ã¤Æ¤¤¤¿¤ê¡¢Ëä¤á¹þ¤Þ¤ì¤¿¤ê¤·¤Æ¤¤¤Æ¤â¤«¤Þ¤¤¤Þ¤»¤ó¡¨ÊÖ¤µ¤ì¤ëÊ¸»úÎó¤Ï¡¢¥Ì¥ëÊ¸»ú¤Ç½ªÎ»¤·¤Þ¤¹¡£¤³¤ÎÅÀ¤ò½ü¤¤¤Æ¡¢Ç§¼±¤µ¤ì¤ëÀµµ¬É½¸½¤Ï¡¢ ed(1) ¤Î¥Þ¥Ë¥å¥¢¥ë¤Ëµ­½Ò¤µ¤ì¤Æ¤¤¤ë¤â¤Î¤ÈÆ±¤¸¤Ç¤¹¡£

[ÆüËÜ¸ìµ¡Ç½]
°ú¿ô¤ÎÊ¸»úÎó¤Ë¡¢EUCÊ¸»ú¤¬¡¢»ÈÍÑ¤Ç¤­¤Þ¤¹¡£

[´ØÏ¢¹àÌÜ]
ed(1), ex(1), egrep(1), fgrep(1), grep(1)
3.3J ¥ê¥ê¡¼¥¹¥Î¡¼¥È UNIX ¥³¥Þ¥ó¥É ¥é¥¤¥Ö¥é¥ê

[¿ÇÃÇ]
wre_exec ¤ÏÆâÉô¥¨¥é¡¼¤¬È¯À¸¤·¤¿¤È¤­ -1 ¤òÊÖ¤·¤Þ¤¹¡£

wre_comp ¤Ï¥¨¥é¡¼¤¬È¯À¸¤·¤¿¤È¤­¼¡¤ÎÊ¸»úÎó¤Î¤É¤ì¤«°ì¤Ä¤òÊÖ¤·¤Þ¤¹:

No previous regular expression

Regular expression too long

unmatched \(

missing ]

too many \(\) pairs

unmatched \)