Re: Regular expression -
Fro1sha - 08.06.2011
Quote:
Originally Posted by BaubaS
Would check only for _ or letters too?
|
One _
Quote:
Originally Posted by BaubaS
TesT_TeST would return 1 or 0?
|
Return 0
And you can check it yourself using this is plugin.
Re: Regular expression -
BaubaS - 08.06.2011
Example please, that player would connect with this form: Firstname_Secondname
example: Yes_Yes
but not YeS_yES
Re: Regular expression -
Gamer_Z - 08.06.2011
Quote:
Originally Posted by BaubaS
Example please, that player would connect with this form: Firstname_Secondname
example: Yes_Yes
but not YeS_yES
|
http://www.regular-expressions.info/refadv.html
regEx is reading many many tutorials before you can get started with it..
Re: Regular expression -
1337connor - 09.06.2011
This is a great plugin..

I'll use it
Re: Regular expression -
BaubaS - 09.06.2011
Quote:
Originally Posted by gamer_Z
|
I can't get it, oh god, example please, then I will get something..

)
Re: Regular expression -
Gamer_Z - 09.06.2011
Read the whole topic

****** gave some and some other people too.
Re: Regular expression -
Slice - 27.10.2011
pawn Code:
CWeb
= regex_build
(\
"((http://)|(https://))?([a-zA-Z0-9]+[.])+[a-zA-Z]{2,4}(:\d+)?(/[~_.\-a-zA-Z0-9=&%@:]+)*\??[~_.\-a-zA-Z0-9=&%@:]*)");
Should work (I think).
Re: Regular expression -
Kar - 27.10.2011
Edit: this one is giving invalid character constant now
pawn Code:
stock ContainsIPEx(const string[])
{
static RegEx:rCIP;
if ( !rCIP )
{
rCIP = regex_build("(25[0-5]|2[0-4][0-9]|[0-1]?[0-9][0-9]?\.){3}(25[0-5]|2[0-4][0-9]|[0-1]?[0-9][0-9])");
}
return regex_match_exid(string, rCIP);
}
Re: Regular expression -
Slice - 27.10.2011
It's because you don't escape your backslashes, i.e.:
Is wrong.
Correct way:
OR, if you don't want to escape all backslashes, you can do:
Note that you won't be able to use newline characters and such (\n).
Re: Regular expression -
Kar - 27.10.2011
The user on the other page gave me the code.. I just put the \" like what you did in ContainsWebsite for now
Re: Regular expression -
Kar - 28.10.2011
Sorry to say, none of your versions work, they can the server when the stock is called
Re: Regular expression -
Lorenc_ - 17.01.2012
God bless you, thanks a LOT!
Re: Regular expression -
jamesbond007 - 01.02.2012
Thanks man u deserve 200+ rep at least
Re: Regular expression -
bryanwilgner - 01.03.2012
it doesnt work on 0.3d?
Re: Regular expression -
s3rious - 01.03.2012
it work on 0.3d. I have it on my server. It works fine.
Re: Regular expression -
bryanwilgner - 02.03.2012
on my 0.3d server doesnt works, why? i have downloaded the the vesion 0.2.1, but it didnt work.
Re : Re: Regular expression -
Enchancer - 05.03.2012
Quote:
Originally Posted by bryanwilgner
on my 0.3d server doesnt works, why? i have downloaded the the vesion 0.2.1, but it didnt work.
|
It doesn't work either for me on my 0.3d R2 server.
Every time I do a gmx or exit, I have the same problem:
Quote:
Originally Posted by Slice
Code:
samp03svr: ./boost/smart_ptr/intrusive_ptr.hpp:166: T* boost::intrusive_ptr<T
>::operator->() const [with T = RegularExpression]: Assertion `px != 0' failed.
Aborted
:/
Crashes the server every time I do a gmx.
|
AW: Regular expression -
[N2L]DarkJoker - 05.03.2012
very very nice Plugin
Re: Regular expression -
Guitar - 05.03.2012
What is that, I'd like to learn more about it.. I read Wikipedia but understood nothing.. I'd like to know how it's being used too.
Re: Regular expression -
Lorenc_ - 26.07.2012
Code:
0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ@=_[].()$
All characters for a valid SA-MP name for anyone that has a "/changename" command!