REGEX - YourShadow's plugin
#1

Hello.
I'm learning a bit REGEX and I tried to use the regular expression I made on pawn by using Pawn.Regex plugin (made by YourShadow - https://sampforum.blast.hk/showthread.php?tid=609570) but nothing works.

There is my expression : https://regex101.com/r/FT3L4d/1/
Here is my code:
PHP Code:
main()
{
    new
        
_result[500],
        
_result_length,
        
expr[] = "object CJ_BIG_SKIP1 (1)\" doublesided=\"false\" model=\"1365\" interior=\"0\" dimension=\"0\" posX=\"-2681.3000488281\" posY=\"865.29998779297\" posZ=\"76.400001525879\" rotX=\"0\" rotY=\"0\" rotZ=\"0\"";
    new 
Regex:reg Regex_New("[A-Z0-9_]*-?\\d+(.\\d+)?"),
        
RegexMatch:match;
    if (
Regex_Match(exprregmatch)) 
    {
        
Match_GetGroup(match1_result_result_length);
        
Match_Free(match);
    }
    
printf("- '%s' - %i"_result_result_length);
    for(new 
i!= _result_lengthi++)
        
printf("- '%s'"_result[i]);
    
Regex_Delete(reg);

Maybe I misunderstood the usage of natives functions?
Reply


Messages In This Thread
REGEX - YourShadow's plugin - by Dayrion - 28.07.2018, 03:32
Re: REGEX - YourShadow's plugin - by BlackBank - 28.07.2018, 12:27
Re: REGEX - YourShadow's plugin - by Dayrion - 28.07.2018, 14:55
Re: REGEX - YourShadow's plugin - by Dayrion - 29.07.2018, 10:02

Forum Jump:


Users browsing this thread: 1 Guest(s)