[TxMt] Re: How can I find and replace carriage returns?
Carpii UK
carpii.uk at gmail.com
Sun Feb 7 19:08:07 UTC 2016
>
> In this case you need the entire line unbroken, so that's why $0 works.
>
> Good point! I had a feeling it was working by accident but couldn't spot
why :-)
>
> Rasmus
> On 07/02/16 19.14, Carpii UK wrote:
>
>
>> Can you please help me understand what is happening between these two
>> expressions?
>>
>> ^ beginning of the line
>>
>> .*::.*
>>
>>
>> $ end of the line
>>
>
>
>
> ^ match the beginning of the line
>
> .* followed by 0 or more characters (apart from newline)
>
> :: followed by 2 literal colon characters
>
> .* followed by 0 or more characters (apart from newline)
>
> $ followed by the end of the line (a \n character)
>
>
> also…
>>
>> can you please tell me what the zero after the $ doing in this string?
>>
>> getValue( $0; 1) ;
>>
>>
>
> The $0 is a way of referencing one of the captures the regular expression
> made
> I'm not entirely sure this capturing syntax is right, normally I use
> brackets to capture, yet it seems to work in textmate.
>
> We need to do this otherwise we don't know what to output after getValue(
>
>
>
>
>
>>
>>
>>
>> On Feb 7, 2016, at 7:29 AM, Carpii UK <carpii.uk at gmail.com > wrote:
>>
>> Try using a regular expression like this..
>>
>> <http://carpii.homeip.net/skitch/Find-20160207-132857.png>
>> http://carpii.homeip.net/skitch/Find-20160207-132857.png
>>
>> The expression is ^.*::.*$
>>
>>
>>
>>
>> _______________________________________________
>> textmate mailing list
>> textmate at lists.macromates.com
>> http://lists.macromates.com/listinfo/textmate
>>
>
>
>
> _______________________________________________
> textmate mailing listtextmate at lists.macromates.comhttp://lists.macromates.com/listinfo/textmate
>
>
>
>
> _______________________________________________
> textmate mailing list
> textmate at lists.macromates.com
> http://lists.macromates.com/listinfo/textmate
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macromates.com/textmate/attachments/20160207/27408db1/attachment.html>
More information about the textmate
mailing list