![]() |
Regular Expressions
Every once in awhile I run across a situation where I wish I could use regular expressions in GS2. Since this is no trivial task to implement myself, not to mention it would most likely be slow if not done at a language level, it would be really nice if regular expressions were added into GS2.
|
Quote:
|
Yeah, I support this.
|
Bump!
There's a couple things I hope to use regex for that would make my life so much better. Better living through regular expressions! :D |
Could you show some theory usage of how it would work? I haven't touched regex before.
|
Lua syntax, it's from one of my WoW addons:
PHP Code:
WoW channel escape sequences work like this: PHP Code:
|
I've never needed regex for coding anything in Graal. Not to mention they can lead to some seriously inefficient code if you don't know what you are doing (e.g., when checking against a non-regular language, unlimited backreferences are an NP-complete problem).
|
I've ran into a couple situations where I really wish I had it. I think getstringkeys() is probably the most common.
|
I'm familiar with regular expressions as they're used in Python. They're a tad bit complicated to learn, but very useful for searching for patterns.
And inefficient code is always an issue, no matter what you do, so it's not really a reason to not support this. I personally could find good use for regex. |
Quote:
|
Quote:
|
Pft, who needs regexps when you could instead build some awesome parser combinator system.
|
Quote:
|
Bumping this because I just ran into a place where this would be perfect.
|
Quote:
|
All times are GMT +2. The time now is 11:32 AM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.