regular expression handling... regexec() and regcomp()?

regular expression handling... regexec() and regcomp()?

Post by int19 » Mon, 11 Oct 2004 15:40:00



Hi all,

I'm writing a piece of network software that will run on an embedded box,
and as luck would have it I haven't much time to test my program on the
target hardware before we have to start deploying, so I was hoping if
someone could alert me to any potential pitfalls with regexec() on a
resource starved platform, especially since I've had zero prior experience
with them? (by "them" I mean the regexec() and regcomp() calls, as well as
the target hardware!)

Assuming the messages I receive will be consistently formatted and I can
write strstr()/strtok()/strchr() etc based code that works, from a
performance standpoint which approach would generally be regarded as more
suitable for an embedded project?

The targets will be a mix of initially picobsd (sorry for minor OT!) and
eventually linux based devices.

Thanks for any and all advice!

--

tirath
~love is the new hate~
domain=int19h

 
 
 

1. Compare Login against Regular Expressions using regexec, regcomp

Hi,

I have a C program that checks logins before an account can be created
or a login can be changed. I am using regexec, regcomp to verify the
logins. Currently I have a file that I read in as input with a list of
restricted logins. For example, an user is not allowed to have a login
with a * in the login name or a & in the login name. The program then
loops through the list checking it against the login. However, I am
having trouble with the \ character. Currently, the user can create a
login with the \ as one of the characters. Could some please tell me
what entry I would have to put im my file that would restrict users
from creating login with the \ as one of the characters.

Thanks

Kent

2. HP C1533 Streamer under SuSE Linux 8.1

3. regexec() and regcomp()

4. gnome video mode switching (RH 6.0)

5. Solaris vs. POSIX regcomp()/regexec()

6. convert dynamic binary --> static binary possible?

7. regexec() and regcomp()

8. Problem with GCC: Please help

9. regcomp(), regexec(), regfree(), and regerror() in Solaris 2.4

10. Using "regcomp" and "regexec"

11. solaris 8 regexec/regcomp bug

12. Q: How to get regcomp() and regexec() working...

13. Field Handling (Regular Expressions)