Hi,
I'm finishing up developing a speech control jukebox (see
intelligentjukebox.com)
Can anyone point me to the easiest to use free library that does very
basic regular expression matching and substitution? E.g. I need do
stuff like this: (perl expression follows)
$s =~ s/\&/and/g; # replace ampersands with "and"
I'm a fairly good using the c++ language, but I have little experience
setting up libraries, make files, etc. I'm using Visual C++ 6.0.
Isn't there any library where I can just add a few .cpp and .h files
to my code?
Setting up libraries seems arcane and nonstandard to me. The language
is hard enough by itself. Is there any guide to this knowledge
anywhere?
So far I've tried unsuccessfully to set up these libraries: http://www.tropicsoft.com/Components/RegularExpression/ http://www.psyon.org/projects/pcre-win32/
Thanks,
Jeff 6 3809
Jeff wrote: Hi,
I'm finishing up developing a speech control jukebox (see intelligentjukebox.com)
Can anyone point me to the easiest to use free library that does very basic regular expression matching and substitution? E.g. I need do stuff like this: (perl expression follows)
$s =~ s/\&/and/g; # replace ampersands with "and"
I don't know how far compatible boost.regex is with perl but thats one
free library that does basic stuff.
I'm a fairly good using the c++ language, but I have little experience setting up libraries, make files, etc. I'm using Visual C++ 6.0. Isn't there any library where I can just add a few .cpp and .h files to my code?
How the hell did you use the speech recognition library? Did you roll
your own?
Jeff wrote: I'm a fairly good using the c++ language, but I have little experience setting up libraries, make files, etc. I'm using Visual C++ 6.0. Isn't there any library where I can just add a few .cpp and .h files to my code?
If your runtime environment includes posix c support, you could perhaps use
the standard regex routines?
#include <sys/types.h>
#include <regex.h>
int regcomp(regex_t *preg, const char *regex, int cflags);
int regexec(const regex_t *preg, const char *string, size_t
nmatch,
regmatch_t pmatch[], int eflags);
size_t regerror(int errcode, const regex_t *preg, char *errbuf,
size_t
errbuf_size);
void regfree(regex_t *preg);
Regards
Mads
--
Mads Bondo Dydensborg ma**@dydensborg.dk http://www.madsdydensborg.dk/
"The government of the United States is not, in any sense, founded on
the Christian religion." -George Washington, November 4, 1796
"No, I don't know that Atheists should be considered as citizens, nor
should they be considered patriots. This is one nation under God."
-George H. W. Bush
On Sat, 23 Jul 2005 10:24:38 +0200, Mads Bondo Dydensborg
<ma*****@challenge.dk> wrote: If your runtime environment includes posix c support, you could perhaps use the standard regex routines?
#include <sys/types.h> #include <regex.h>
int regcomp(regex_t *preg, const char *regex, int cflags); int regexec(const regex_t *preg, const char *string, size_t nmatch, regmatch_t pmatch[], int eflags); size_t regerror(int errcode, const regex_t *preg, char *errbuf, size_t errbuf_size); void regfree(regex_t *preg);
Thanks, I like this solution best. I added the includes, but I get a
compile error. Do you know how I can fix this?
---------------------------
Deleting intermediate files and output files for project 'IntelliMusic
- Win32 Release'.
--------------------Configuration: IntelliMusic - Win32
Release--------------------
....
J:\program files\Microsoft Visual
Studio6.0\VC98\MFC\INCLUDE\afxtempl.h(1233) : error C2668: 'memset' :
ambiguous call to overloaded function
J:\program files\Microsoft Visual
Studio6.0\VC98\INCLUDE\utility(21) : while compiling class-template
member function 'void __thiscall CMap<class CSAPrefsSubDlg *,class
CSAPrefsSubDlg *,unsigned long,unsigned long
&>::InitHashTable(unsigned
int,int)'
....
Generating Code...
Error executing cl.exe.
IntelliMusic.exe - 1 error(s), 0 warning(s)
---------------------------
I should probably post to a win32 ng now.
On 22 Jul 2005 15:33:29 -0700, u.********@gmail.com wrote: Jeff wrote: Hi,
I'm finishing up developing a speech control jukebox (see intelligentjukebox.com)
Can anyone point me to the easiest to use free library that does very basic regular expression matching and substitution? E.g. I need do stuff like this: (perl expression follows)
$s =~ s/\&/and/g; # replace ampersands with "and"
I don't know how far compatible boost.regex is with perl but thats one free library that does basic stuff.
I'm a fairly good using the c++ language, but I have little experience setting up libraries, make files, etc. I'm using Visual C++ 6.0. Isn't there any library where I can just add a few .cpp and .h files to my code?
How the hell did you use the speech recognition library? Did you roll your own?
Uhh, yes I did! I rolled my own SR library into a big fattie and
smoked it. Now its all gone! For now I'm stuck with M$.
Ok, this is what allowed me to use the ms sapi. Without this site I
never would have started my project.
SAPI 5.0 Tutorial I: An Introduction to SAPI http://www.generation5.org/content/2001/sr00.asp
Jeff wrote: If your runtime environment includes posix c support, you could perhaps use the standard regex routines?
Thanks, I like this solution best. I added the includes, but I get a compile error. Do you know how I can fix this?
no, sorry, my knowledge about Windows is really limited.
Good luck
Mads
--
Mads Bondo Dydensborg ma**@dydensborg.dk http://www.madsdydensborg.dk/
I disapprove of what you say, but I will defend to the death your right to
say it.
- Beatrice Hall [pseudonym: S.G. Tallentyre], 1907 (many times wrongfully
attributed to Voltaire)
>>>If your runtime environment includes posix c support, you could perhaps use the standard regex routines?
Thanks, I like this solution best. I added the includes, but I get a compile error. Do you know how I can fix this?
no, sorry, my knowledge about Windows is really limited.
Windows is not POSIX compliant and has no built-in regular expression
library.
You'll have to go find one. Henry Spencer wrote one for wxWidgets which is
freely available. PCRE (Perl-compatible regular expressions) lib is free and
has C++ wrappers. These things can be found with Google.
--John Ratliff This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Bradley Plett |
last post by:
I'm hopeless at regular expressions (I just don't use them often
enough to gain/maintain knowledge), but I need one now and am looking
for help. I need to parse through a document to find a URL,...
|
by: Buddy |
last post by:
Can someone please show me how to create a regular expression to do the
following
My text is set to
MyColumn{1, 100} Test
I want a regular expression that sets the text to the following...
|
by: Laser Lu |
last post by:
Hello, everybody,
do you know how to use this Grouping Construct?
(?> )
I've found its reference on MSDN, but still can not understand it totally.
The following is its description:
...
|
by: S.Kartikeyan |
last post by:
I have the following problem.
I am using the follwing Regular Expression validator(REV) with validator expressions
^{1,2}$
^{3,20}$
The idea of the first exp is 1 or 2 digits
the idea of second...
|
by: norton |
last post by:
Hello,
Does any one know how to extact the following text into 4 different
groups(namely Date, Artist, Album and Quality)?
- Artist - Album
Artist - Album
- Artist - Album
- Artist -...
|
by: lucky |
last post by:
hi there!!
i'm looking for a code snipett wich help me to search some words into a
particular string and replace with a perticular word. i got a huge data
string in which searching traditional...
|
by: Pete Davis |
last post by:
I'm using regular expressions to extract some data and some links from some
web pages. I download the page and then I want to get a list of certain
links.
For building regular expressions, I use...
|
by: Lee Grissom |
last post by:
I want to parse the following string into 3 parts per match. I almost got
it, but my expression has a flaw in it.
I tried this, but didn't quite work the way I expect on the second match b/c...
|
by: Uwe Schmitt |
last post by:
Hi,
Is anobody aware of this post: http://swtch.com/~rsc/regexp/regexp1.html
?
Are there any plans to speed up Pythons regular expression module ?
Or
is the example in this artricle too...
|
by: ryjfgjl |
last post by:
ExcelToDatabase: batch import excel into database automatically...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: Vimpel783 |
last post by:
Hello!
Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
|
by: jfyes |
last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
|
by: ArrayDB |
last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
|
by: PapaRatzi |
last post by:
Hello,
I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
|
by: Shællîpôpï 09 |
last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
|
by: af34tf |
last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome former...
| |