We Recommend

Beginning AppleScript (Programmer to Programmer) Beginning AppleScript (Programmer to Programmer)
Geared toward programmers with no prior development knowledge, Beginning AppleScript serves as a comprehensive guide to using AppleScript on the Mac OS X platform. This title introduces the reader to AppleScript, and then illustrates how to efficiently start writing scripts through sample programs as each concept is introduced.


Posted By

hansamann on 02/02/07


Tagged

regex regular expressions groovyseries


Versions (?)


Who likes this?

1 person has marked this snippet as a favorite

jsbournival


Groovy Series: Regular Expressions 2/3


Published in: Groovy 


URL: http://hansamann.podspot.de/files/grails_podcast_episode_32_1036.mp3

  1. //examples for match operator - match is more restrictive than find!
  2. def line = "This is a test line"
  3. assert line ==~ /This is a test line/
  4. line -= " line"
  5. assert !(line ==~ /This is a test line/)
  6. def booleanValue = (line ==~ /This is a test/)
  7. assert booleanValue == true

Report this snippet 

You need to login to post a comment.