We Recommend

Essential ActionScript 3.0 Essential ActionScript 3.0
The book focuses on the core language and object-oriented programming, but also adds a deep look at the centerpiece of Flash Player's new API: display programming. Enjoy hundreds of brand new pages covering exciting new language features, such as the DOM-based event architecture, E4X, and namespaces--all brimming with real-world sample code.


Posted By

hansamann on 02/02/07


Tagged

regex regular expressions groovyseries


Versions (?)


Who likes this?

4 people have marked this snippet as a favorite

jsbournival
hendersk
mbanfi
adaptives


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.