Home Download Buy Blog Forum Support

ST2: regex behaves different on Mac and Linux

ST2: regex behaves different on Mac and Linux

Postby djczaski on Fri Mar 08, 2013 3:14 am

I was trying to grab all the function definitions from a header file to create snippets and I noticed this quirk.

regex-difference.png
regex-difference.png (185.5 KiB) Viewed 257 times


On Mac OS X 10.6.8 (left), the regular expression (.+) grabs an entire line. On Ubuntu 12.10 (right), the same regular expression misses the trailing ");".
djczaski
 
Posts: 11
Joined: Tue Mar 05, 2013 3:56 am

Re: ST2: regex behaves different on Mac and Linux

Postby jps on Fri Mar 08, 2013 4:53 am

This is because you have whole words toggle turned on for linux, but not for mac
jps
Site Admin
 
Posts: 3067
Joined: Wed Mar 19, 2008 12:33 pm


Return to Technical Support

Who is online

Users browsing this forum: Google [Bot] and 22 guests