<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Excuse me, I wasn't very precise, however my link explains the 'pattern‘ attribute.<br class=""><div><blockquote type="cite" class=""><div class="">Le 1 nov. 2015 à 20:52, Louis Abraham <<a href="mailto:louis.abraham@polytechnique.edu" class="">louis.abraham@polytechnique.edu</a>> a écrit :</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="Content-Type" content="text/html charset=utf-8" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">You can use a regular expression with the match key. For example in the Python bundle :<div class=""><div class="">{<span class="Apple-tab-span" style="white-space:pre">       </span>name = 'constant.numeric.integer.hexadecimal.python';</div><div class=""><span class="Apple-tab-span" style="white-space:pre">     </span>match = '\b(?i:(0x\h*))';</div><div class="">};</div><div class=""><br class=""></div><div class="">Grammar writing is well explained there : <a href="https://manual.macromates.com/en/language_grammars" class="">https://manual.macromates.com/en/language_grammars</a> although this in in the TextMate 1 documentation.</div><div class=""><blockquote type="cite" class=""><div class="">Le 1 nov. 2015 à 20:37, Jacob Carlborg <<a href="mailto:doob@me.com" class="">doob@me.com</a>> a écrit :</div><br class="Apple-interchange-newline"><div class=""><div class="">To create a pattern in a TextMate grammar that matches across multiple lines the "begin" and "end" keys are necessary. But is it possible to somehow restrict what is matched between the begin and the end?<br class=""><br class="">I'm trying to create a pattern for the hex string literal in D. It's like a regular string literal but can only contain hex characters.<br class=""><br class="">-- <br class="">/Jacob Carlborg<br class=""><br class=""><br class="">_______________________________________________<br class="">textmate mailing list<br class=""><a href="mailto:textmate@lists.macromates.com" class="">textmate@lists.macromates.com</a><br class=""><a href="http://lists.macromates.com/listinfo/textmate" class="">http://lists.macromates.com/listinfo/textmate</a><br class=""></div></div></blockquote></div><br class=""></div></div><br class="">_______________________________________________<br class="">textmate mailing list<br class=""><a href="mailto:textmate@lists.macromates.com" class="">textmate@lists.macromates.com</a><br class="">http://lists.macromates.com/listinfo/textmate</div></blockquote></div><br class=""></body></html>