UNIX Socket FAQ

A forum for questions and answers about network programming on Linux and all other Unix-like systems

You are not logged in.

  • Index
  • » C
  • » Extended Regular Expression (regcomp() e regexec())

#1 2004-05-13 03:02 PM

felix
Member
Registered: 2003-12-04
Posts: 171

Re: Extended Regular Expression (regcomp() e regexec())

Offline

#2 2004-05-13 08:46 PM

i3839
Oddministrator
From: Amsterdam
Registered: 2003-06-07
Posts: 2,239

Re: Extended Regular Expression (regcomp() e regexec())

* means zero or more of the previous characters (or whatever), so I think you want something like (notice the '.'):

# ./x "strange.*ugly"

Offline

#3 2004-05-13 09:46 PM

felix
Member
Registered: 2003-12-04
Posts: 171

Re: Extended Regular Expression (regcomp() e regexec())

Hi i3839,

Thkz a lot, it worked!

ps.: How i'm wired :P

Well, let's use this topic, someone know a funcion or if exist some way of make the something that with regexec() but instead of return if it's found or not as the above example replace the strings. For example if it find strange AND ugly so replace it by normal and wonderful ? ;)

Regards..

Offline

#4 2004-05-13 10:06 PM

i3839
Oddministrator
From: Amsterdam
Registered: 2003-06-07
Posts: 2,239

Re: Extended Regular Expression (regcomp() e regexec())

You could take a look at the source code of sed...

Offline

#5 2004-05-14 03:43 PM

felix
Member
Registered: 2003-12-04
Posts: 171

Re: Extended Regular Expression (regcomp() e regexec())

Hummm, good idea, thkz again. ;)

regards

Offline

#6 2007-05-31 07:30 PM

Kapil
Member
Registered: 2007-05-28
Posts: 7

Re: Extended Regular Expression (regcomp() e regexec())

Hi Felix,
Incase you have any doubts, you can ask , I would be more than happy to help.

-Kapil

Offline

  • Index
  • » C
  • » Extended Regular Expression (regcomp() e regexec())

Board footer

Powered by FluxBB