Anyone into RegEx? -
Sew_Sumi - 08.06.2017
I need a few made for something I am working on...
Re: Anyone into RegEx? -
CheezIt - 08.06.2017
http://regexr.com/
RegExr is an online tool to learn, build, & test Regular Expressions (RegEx / RegExp).
Re: Anyone into RegEx? -
Sew_Sumi - 08.06.2017
Yea, I'm asking if someone is capable in it, not asking for links that you just picked up from ******.
Re: Anyone into RegEx? -
Mauzen - 08.06.2017
Isnt hard to assemble regexes. I could help though.
Re: Anyone into RegEx? -
CheezIt - 09.06.2017
Quote:
Originally Posted by Sew_Sumi
Yea, I'm asking if someone is capable in it, not asking for links that you just picked up from ******.
|
...to
learn...
I didn't pick it up from ******, I've used the site before. And for your information, the site is fairly complete. It has expressions community members made, references to help you create your own expressions, shows you hints, what you did wrong, if there's an error in your expression, etc.
Give a guy a fish and he's set for a day, teach him how to fish and he's set for the rest of his life. That was mainly my intention, you don't need assistance if you got all you need on one site.
Re: Anyone into RegEx? -
Sew_Sumi - 09.06.2017
Quote:
Originally Posted by CheezIt
...to learn...
I didn't pick it up from ******, I've used the site before. And for your information, the site is fairly complete. It has expressions community members made, references to help you create your own expressions, shows you hints, what you did wrong, if there's an error in your expression, etc.
Give a guy a fish and he's set for a day, teach him how to fish and he's set for the rest of his life. That was mainly my intention, you don't need assistance if you got all you need on one site.
|
Yea yea, I'm not looking to learn it, I need 3 regexs made that are relatively basic, but aren't covered in examples, or shared solutions. This is part of a bigger project, and again, I'd rather not learn it as it's such a small component.
I'll shoot that high horse down, as if it was never meant to be...
Re: Anyone into RegEx? -
CheezIt - 09.06.2017
Quote:
Originally Posted by Sew_Sumi
Yea yea, I'm not looking to learn it, I need 3 regexs made that are relatively basic, but aren't covered in examples, or shared solutions. This is part of a bigger project, and again, I'd rather not learn it as it's such a small component.
I'll shoot that high horse down, as if it was never meant to be...
|
Basic yet you can't do it on your own, or don't want it (still yet basic...). Sad.
Re: Anyone into RegEx? -
Sew_Sumi - 09.06.2017
Quote:
Originally Posted by CheezIt
Basic yet you can't do it on your own, or don't want it (still yet basic...). Sad.
|
Basic, yet I'd rather not spend the time, learning a language, just for 3 friggen lines... Now stop spamming/postwhoring/trolling/whatever the fuck you think you are doing, and jog on...
Re: Anyone into RegEx? -
Dignity - 09.06.2017
Quote:
Originally Posted by CheezIt
Basic yet you can't do it on your own, or don't want it (still yet basic...). Sad.
|
Honestly man all of your posts generally are alike and full of the same condescending bullshit that you've been derailing threads with for the past two weeks
You actually remind me of someone who apparently "quit" a while back lmfao
just stop
Re: Anyone into RegEx? -
DTV - 09.06.2017
Quote:
Originally Posted by CheezIt
And you have to have someone else write those 3 basic friggen lines for you instead? What you ned is given to you, now stop being lazy and start writting!!!
|
Maybe he doesn't have the time or desire to learn, why bother if you see yourself only using it for 3 lines of code?
Re: Anyone into RegEx? -
Vince - 09.06.2017
And you can't just post the lines you need to match here? Or an example of what should be matched? Get to the point.
Re: Anyone into RegEx? -
Sew_Sumi - 09.06.2017
Quote:
Originally Posted by Vince
And you can't just post the lines you need to match here? Or an example of what should be matched? Get to the point.
|
I am to the point...
I'm wanting the pawno error messages regexed.
Code:
C:\Users\Fudge\Desktop\samp037_svr_R2-1-1_win32\filterscripts\errors.pwn(27) : warning 217: loose indentation
Code:
C:\Users\Fudge\Desktop\samp037_svr_R2-1-1_win32\gamemodes\LSTDM1.pwn(4760) : error 021: symbol already defined: "strtok"
So in this case, it would come out with
Code:
C:\Users\Fudge\Desktop\samp037_svr_R2-1-1_win32\gamemodes\LSTDM1.pwn 4760 021 symbol already defined: "strtok"
So it can give the complete filename, error line, error number and the message.
Same with a warning line.
There will be others, but the basic file/line number/message is fine for the minute.
The filename in particular should also recognize \\LANMGR\Share\ as well as D:\SAMP\
Minus the braces of course around the line number.
Re: Anyone into RegEx? -
BigETI - 09.06.2017
The time you wasted to write this thread, you could have learned regular expressions by yourself instead.
Re: Anyone into RegEx? -
Sew_Sumi - 09.06.2017
Quote:
Originally Posted by BigETI
The time you wasted to write this thread, you could have learned regular expressions by yourself instead.
|
Again, not interested in this response. Go spam elsewhere.
Re: Anyone into RegEx? -
Vince - 09.06.2017
Fairly straight forward and something like this should do:
Code:
/^(.+)\((\d+)\) : (warning|error|fatal error) (\d+): (.+)$/ig
Code:
$1: path
$2: line number
$3: class (warning, error or fatal error)
$4: error/warning number
$5: message
Re: Anyone into RegEx? -
Sew_Sumi - 09.06.2017
Cheers for that Vince, seems like it has something with it.
When I'm getting a response from an output, I get nothing in all, except for the Error number, instead of being in 4, is in 3.
(.+) The compiler logs I think don't have endline between the filename and the (error). They also seem to only have the endline in them, not a clear line.
Are there any command line switches to change the output of pawncc at all?
Re: Anyone into RegEx? -
BigETI - 09.06.2017
AgAiN, nOt InTeReStEd In ThIs ReSpOnSe. Go SpAm ElSeWhErE.
Re: Anyone into RegEx? -
Sew_Sumi - 09.06.2017
Quote:
Originally Posted by BigETI
AgAiN, nOt InTeReStEd In ThIs ReSpOnSe. Go SpAm ElSeWhErE.
|
Sorry but the only sign language I know is...
Maybe that will help you on your way to a new, healthier you...
Re: Anyone into RegEx? -
BigETI - 09.06.2017
My health condition was fine, until now. Thank you.
Re: Anyone into RegEx? -
Mauzen - 09.06.2017
Quote:
Originally Posted by Vince
Fairly straight forward and something like this should do:
Code:
/^(.+)\((\d+)\) : (warning|error|fatal error) (\d+): (.+)$/ig
Code:
$1: path
$2: line number
$3: class (warning, error or fatal error)
$4: error/warning number
$5: message
|
That will work well, but only for a single error. You forgot the multiline parameter to check line-by-line
Code:
/^(.+)\((\d+)\) : (warning|error|fatal error) (\d+): (.+)$/igm