Hi,
i want to use regular expression in my project for validation of
email. How i can use Regular Expression in VC?? i am using vs2k5 IDE.
i seen boost api for regular expression, is it any regular expression
functionality available in VC ???? if yes, how i can use them???
regards,
-aims
.. 8 2060
On 3 avr, 14:45, "Mohammad Omer" <momer...@gmail.comwrote:
Hi,
i want to use regular expression in my project for validation of
email. How i can use Regular Expression in VC?? i am using vs2k5 IDE.
i seen boost api for regular expression, is it any regular expression
functionality available in VC ???? if yes, how i can use them???
If you're doing managed programming (ie, using C++/CLI and the .NET
framework), there is regular expression support in the framework.
If you're doing native coding, there is a regex engine in ATL server :
see http://msdn2.microsoft.com/en-us/lib...h4(VS.80).aspx
Anyway, I would rather recommend to use boost...
Arnaud
MVP - VC
In article <11*********************@l77g2000hsb.googlegroups. com>,
Mohammad Omer <mo******@gmail.comwrote:
>i want to use regular expression in my project for validation of email. How i can use Regular Expression in VC?? i am using vs2k5 IDE. i seen boost api for regular expression, is it any regular expression functionality available in VC ???? if yes, how i can use them???
Try http://www.pcre.org/ -- Perl Compatible Regular
Expressions. It's available with full source code, and has a BSD
license (making it quite easy to distribute with any of your apps).
It's been used in a lot of well-known software projects. It'd probably
be easier to integrate than boost.
Nathan Mates
--
<*Nathan Mates - personal webpage http://www.visi.com/~nathan/
# Programmer at Pandemic Studios -- http://www.pandemicstudios.com/
# NOT speaking for Pandemic Studios. "Care not what the neighbors
# think. What are the facts, and to how many decimal places?" -R.A. Heinlein
Also you can use GRETA http://research.microsoft.com/projects/greta/
Regards
--
Cholo Lennon
Bs.As.
ARG
"Mohammad Omer" <mo******@gmail.comwrote in message news:11*********************@l77g2000hsb.googlegro ups.com...
Hi,
i want to use regular expression in my project for validation of
email. How i can use Regular Expression in VC?? i am using vs2k5 IDE.
i seen boost api for regular expression, is it any regular expression
functionality available in VC ???? if yes, how i can use them???
regards,
-aims
.
Hi Cholo Lennon!
i found these line of code for using regular expression in VC, please
guide me, Is this right to use it or use some other API for the
regular expression??
Code is:
#include <atlrx.h>
CAtlRegExp<re;
re.Parse(TEXT("\\w+([-+.']\\w+)*@\\w+([-.]\\w+)*\\.\\w+([-.]\\w+)*"));
CAtlREMatchContext<mc;
if(!re.Match(singleEmail, &mc))
{
retStatus = FALSE;
break;
}
Regards,
-aims
Those lines use ATL server library (check Arnaud response). In general all regex libraries use the same concepts so it's easy to
port those code to other libraries.
ATL server is part of VC 7 (or above) so it's fine to use it. If you want portability to other plattforms you can use boost
libraries ( http://www.boost.org/libs/regex/doc/index.html) or like Nathan Mates said, Perl Compatible Regular Expressions.
Regards
--
Cholo Lennon
Bs.As.
ARG
"Mohammad Omer" <mo******@gmail.comescribió en el mensaje news:11**********************@y66g2000hsf.googlegr oups.com...
Hi Cholo Lennon!
i found these line of code for using regular expression in VC, please
guide me, Is this right to use it or use some other API for the
regular expression??
Code is:
#include <atlrx.h>
CAtlRegExp<re;
re.Parse(TEXT("\\w+([-+.']\\w+)*@\\w+([-.]\\w+)*\\.\\w+([-.]\\w+)*"));
CAtlREMatchContext<mc;
if(!re.Match(singleEmail, &mc))
{
retStatus = FALSE;
break;
}
Regards,
-aims
Thanks Cholo Lennon.
Regards,
-aims This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Jack Smith |
last post by:
I posted this question earlier, but I got no responses. Can anyone
help me out here...any hints or even how to start? Thanks in advance.
Let doubleswap(x) be the string formed by replacing each...
|
by: Kenneth McDonald |
last post by:
I'm working on the 0.8 release of my 'rex' module, and would appreciate
feedback, suggestions, and criticism as I work towards finalizing the
API and feature sets. rex is a module intended to make...
|
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: Neri |
last post by:
Some document processing program I write has to deal with documents
that have headers and footers that are unnecessary for the main
processing part. Therefore, I'm using a regular expression to go...
|
by: Ludwig |
last post by:
Hi,
i'm using the regular expression \b\w to find the beginning of a word,
in my C# application. If the word is 'public', for example, it works.
However, if the word is '<public', it does not...
|
by: LordHog |
last post by:
Hello all,
I am attempting to create a small scripting application to be used
during testing. I extract the commands from the script file I was going
to tokenize the each line as one of the...
|
by: Chris |
last post by:
Hi everyone,
I'm trying to parse through the contents of some text files with regular
expressions, but am new to regular expressions and how to use them in
VB.net.
I'm pretty sure that the...
|
by: =?Utf-8?B?TWF0dA==?= |
last post by:
I have the following words, and I want to extract the first part and the
trailing numbers.
OP001 =ABC, 001
ST02 =CD, 02
00A =00A, null
I have the following regular express:...
|
by: Henning_Thornblad |
last post by:
What can be the cause of the large difference between re.search and
grep?
This script takes about 5 min to run on my computer:
#!/usr/bin/env python
import re
row=""
for a in range(156000):...
|
by: shaoen01 |
last post by:
Hi,
I am new to Perl and stumbled onto some regular expressions and not sure if i am right in interpreting it.
If my text is "My organization is great!"
Regular express used: s/z*/s/
...
|
by: taylorcarr |
last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: aa123db |
last post by:
Variable and constants
Use var or let for variables and const fror constants.
Var foo ='bar';
Let foo ='bar';const baz ='bar';
Functions
function $name$ ($parameters$) {
}
...
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
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...
|
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,...
|
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...
| |