Tutorial by Examples: dollar

import locale locale.setlocale(locale.LC_ALL, '') Out[2]: 'English_United States.1252' locale.currency(762559748.49) Out[3]: '$762559748.49' locale.currency(762559748.49, grouping=True) Out[4]: '$762,559,748.49'
def param = 'string' def str = $/ multiline $param no need to escape slash \n $ $$ /$ assert str instanceof GString assert str.readLines().size() == 6 assert str.contains('\\n') assert str.contains('$')
The PCRE-compliant PCRE_DOLLAR_ENDONLY modifier that makes the $ anchor match at the very end of the string (excluding the position before the final newline in the string). /^\d+$/D is equal to /^\d+\z/ and matches a whole string that consists of 1 or more digits and will not match "123...

Page 1 of 1