473,396 Members | 1,774 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Help wih regexec() function in libc.a library ( Solaris platform)

Hi,
I am using a function called regexec() as defined in the regex.h
header in libc.a.
I am coding on Solaris 8 machine. The function is defined as follows :

int regexec(const regex_t * preg, char * string, (size_t)
nmatch,regmatch_t pmatch[],int eflags);

My Query is this :

How do I use the pmatch[] field to display the subexpressions which
match?

For instance, if I want to simply match the string with the regular
expression, I can
define the nmatch field to be 0 and pmatch[] as NULL. However, I
require to obtain
the subexpressions using pmatch[].... Can anyone give some practical
examples?

Thanks and Regards,

Timmy Jose.

Mar 13 '06 #1
2 2370
"zoltan" <zo*********@gmail.com> writes:
I am using a function called regexec() as defined in the regex.h
header in libc.a. I am coding on Solaris 8 machine. The function is
defined as follows :

int regexec(const regex_t * preg, char * string, (size_t)
nmatch,regmatch_t pmatch[],int eflags);

My Query is this :

How do I use the pmatch[] field to display the subexpressions which
match?

[...]

We don't know. regexec() isn't defined by the C standard. It is
defined by POSIX, so you might try comp.unix.programmer. (But try
"man regexec" first; you might find the answer there.)

--
Keith Thompson (The_Other_Keith) ks***@mib.org <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <*> <http://users.sdsc.edu/~kst>
We must do something. This is something. Therefore, we must do this.
Mar 13 '06 #2

Keith Thompson wrote:
"zoltan" <zo*********@gmail.com> writes:
I am using a function called regexec() as defined in the regex.h
header in libc.a. I am coding on Solaris 8 machine. The function is
defined as follows :

int regexec(const regex_t * preg, char * string, (size_t)
nmatch,regmatch_t pmatch[],int eflags);

My Query is this :

How do I use the pmatch[] field to display the subexpressions which
match?

[...]

We don't know. regexec() isn't defined by the C standard. It is
defined by POSIX, so you might try comp.unix.programmer. (But try
"man regexec" first; you might find the answer there.)

--
Keith Thompson (The_Other_Keith) ks***@mib.org <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <*> <http://users.sdsc.edu/~kst>
We must do something. This is something. Therefore, we must do this.


Thanks Keith. I will try that group. I tried "manning" but there was no
specific example for my query and it got more fuzzy!!! ;-)

Regards,

Timmy Jose.

Mar 13 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: John Ky | last post by:
Hello: Building Python works fine. Now I am trying to build my own python module on Solaris 9, but I'm getting the following conflict: In file included from...
3
by: whamoo | last post by:
Hello, I'm looking for a library like ncurses, but that can be used also on windows in a very simple way... There is some library that do some like curses? Thanks a lot --
4
by: gs | last post by:
I have searched Google, MSDN,... for a week. I am still unable to make available functions in my csharp dll as native windows functions for some legacy non dotnet application I just want to...
1
by: jing | last post by:
Hi all. here is the source file: http://www.cs.aau.dk/~simas/tpr/tpr1.1.zip btw, the compiler is gcc 3.3.1 just for research use. any help would be most appreciated.
3
by: Damiano | last post by:
Hello, I have found "portaudio" (http://www.portaudio.com) to use audio I/O device. This library is good or not? i want to sound a (raw) audio bytes arrived from a socket. Thanks
1
by: rajarora | last post by:
Hi, In running a C++ Program at Sun-Solaris Program, my program is getting crashed in the fprintf() function of library "r/lib/libc.so.1". The program crash is occurring when main() starts. Might...
1
by: nitupatra | last post by:
I executed the command " perl -MCPAN -e shell " and run the command cpan> install Archive::Zip. But ftp connections are failed to get different types of package and installation was failed. Can...
4
by: Kalrasoft | last post by:
Hello to all friend! i m new in programming.i wanna add/remove own newt function/module to c library tlib.bt im facing problem.plz help me.i m using Borland turbo c++ compiler.thanx for read my query!
1
by: cimsingapore | last post by:
Dear all; Recently our organization needs to convert a 3rd party’s MFC class library into managed code for usage in .NET. In the SDK, there is a header file and a dll library. I only have...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.