Jump to content


Photo

Gregex


  • Please log in to reply
12 replies to this topic

#1 Yourself

Yourself

    The Ultimate Pronoun

  • GMC Elder
  • 7352 posts
  • Version:Unknown

Posted 01 March 2007 - 04:39 PM

As some of you may remember, I released a regular expression DLL ages ago. Well, here's an adaptation of it for the new GM7 extension mechanism.

Download

The extension version is pretty much identical, but is easier to use because of the code hints in GM's editor.
  • 0

#2 pcnerd

pcnerd

    GMC Member

  • New Member
  • 197 posts

Posted 03 March 2007 - 03:02 PM

What does it do?
  • 0

#3 Chronic

Chronic

    Administrator

  • Global Moderators
  • 2729 posts
  • Version:GM:Studio

Posted 03 March 2007 - 03:30 PM

As some of you may remember, I released a regular expression DLL ages ago.  Well, here's an adaptation of it for the new GM7 extension mechanism.


  • 0

My recent tutorials: [Auto-Tiling] [Text Based Menu] [Sprite Based Menu] [View more at my site]
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
R.I.P Mom (1951-2008)


#4 Yourself

Yourself

    The Ultimate Pronoun

  • GMC Elder
  • 7352 posts
  • Version:Unknown

Posted 03 March 2007 - 04:57 PM

http://www.regular-expressions.info/
http://en.wikipedia....ular_expression
  • 0

#5 IceMetalPunk

IceMetalPunk

    InfiniteIMPerfection

  • GMC Elder
  • 9603 posts
  • Version:GM:Studio

Posted 09 March 2007 - 06:27 PM

Is there any way to use the case-insensitive ("i") flag with this? I tried using the /i at the end for a flag, but it didn't work.

-IMP :GM132: :)
  • 0

:GM123: Are you an artist who likes creating original creature designs? Maybe you can help out with Elementa here! Give it a look; you might like the idea :)

:bunny: :excl: :bunny: :excl: :bunny: :excl: :bunny: :excl: :bunny: :excl: :bunny: :excl: :bunny: :excl: :bunny: :excl: :bunny: :excl: :bunny:


#6 Yourself

Yourself

    The Ultimate Pronoun

  • GMC Elder
  • 7352 posts
  • Version:Unknown

Posted 09 March 2007 - 09:00 PM

Yeah, at the beginning of the pattern, use (?i) to set it. You can use (?-i) to turn it off again.
  • 0

#7 IceMetalPunk

IceMetalPunk

    InfiniteIMPerfection

  • GMC Elder
  • 9603 posts
  • Version:GM:Studio

Posted 09 March 2007 - 09:56 PM

Oh, okay. Thanks :P ! Love this DLL. If only GM had a built-in shorthand for Regular Expressions, I wouldn't have to double-escape everything (i.e. for \b I need to use \\b, etc). But that's a minor complaint ;)

-IMP :wacko: ;)

*EDIT* Whenever I try to use the ?i in the regular expression, I get an "Unexpected Error Occurred" error message... :)

Edited by IceMetalPunk, 09 March 2007 - 10:00 PM.

  • 0

:GM123: Are you an artist who likes creating original creature designs? Maybe you can help out with Elementa here! Give it a look; you might like the idea :)

:bunny: :excl: :bunny: :excl: :bunny: :excl: :bunny: :excl: :bunny: :excl: :bunny: :excl: :bunny: :excl: :bunny: :excl: :bunny: :excl: :bunny:


#8 Yourself

Yourself

    The Ultimate Pronoun

  • GMC Elder
  • 7352 posts
  • Version:Unknown

Posted 09 March 2007 - 10:49 PM

It's not ?i, you have to put parentheses around it, like this:

(?i)the

Will match "the" regardless of case.

Also, you don't have to double escape anything. The only escape sequence in GM is \# and that's only interpreted in functions like show_message() and draw_text().
  • 0

#9 amerup

amerup

    GMC Member

  • New Member
  • 21 posts

Posted 09 March 2007 - 11:24 PM

Does this mean you can use HTML in Gm?
  • 0

#10 Yourself

Yourself

    The Ultimate Pronoun

  • GMC Elder
  • 7352 posts
  • Version:Unknown

Posted 10 March 2007 - 01:12 AM

Use it how? This extension will certainly make it easier to write an HTML parser. But that doesn't make it any easier to render it.
  • 0

#11 IceMetalPunk

IceMetalPunk

    InfiniteIMPerfection

  • GMC Elder
  • 9603 posts
  • Version:GM:Studio

Posted 10 March 2007 - 02:57 PM

Oh, okay. My bad, sorry about that (I feel a little dumb now :huh: ).

-IMP ;) :D
  • 0

:GM123: Are you an artist who likes creating original creature designs? Maybe you can help out with Elementa here! Give it a look; you might like the idea :)

:bunny: :excl: :bunny: :excl: :bunny: :excl: :bunny: :excl: :bunny: :excl: :bunny: :excl: :bunny: :excl: :bunny: :excl: :bunny: :excl: :bunny:


#12 Recreate

Recreate

    Furry

  • GMC Member
  • 2992 posts
  • Version:GM:Studio

Posted 26 July 2008 - 06:01 PM

Its too bad i have gm6.1
I tried upgrading but it wont work :)
  • 0

If the post that you are reading was created prior to 2011. For the safety of the general public, It is not to be regarded under any circumstances.
Please don't ask me to join your group at anything.


#13 Yourself

Yourself

    The Ultimate Pronoun

  • GMC Elder
  • 7352 posts
  • Version:Unknown

Posted 26 July 2008 - 11:17 PM

There's a DLL version on my site.
  • 0