Re: Grep: pattern_2 NOT preceded by pattern_1 (with pattern_1 not necessarily IMMEDIATELY to the left of pattern_2)

2018-10-13 Thread F. Alfredo Rego
Hi Patrick,

The special case “fixed-length specific string” is perfect. So, I rephrase:

Dear engine,

Here are some lines:

Some stuff of no interest whatsoever
ostracized_stringwanted_string   
ostracized_string wanted_string
ostracized_string with Some stuff and then wanted_string
wanted_string
Some stuff and then wanted_string
 

Please look for wanted_string in the current line. 

If the current line DOESN’T CONTAIN wanted_string, great. Skip this line 
and try the next line.

However, if the current line CONTAINS wanted_string:

Does the current line ALSO CONTAIN ostracized_string ANYWHERE BEFORE 
wanted_string 
(whether ostracized_string is immediately before wanted_string or not)? 

If yes, skip this line and try the next line.

If not, select this line.



You WILL SELECT the following lines:

wanted_string
Some stuff and then wanted_string


You WILL IGNORE the following lines:

Some stuff of no interest whatsoever
ostracized_stringwanted_string   
ostracized_string wanted_string
ostracized_string with Some stuff and then wanted_string
 

Thanks!

Alfredo

P.S.

The general case “arbitrary patterns” would be better, of course, but that 
would be icing on the cake.



> On Oct 13, 2018, at 12:54 PM, Patrick Woolsey  wrote:
> 
> 
> Are your 'pattern_1' and 'pattern_2' actual arbitrary patterns, or are they 
> instead strings (or sets of strings)?
> 
> 
> Regards,
> 
> Patrick Woolsey
> ==
> Bare Bones Software, Inc. 

-- 
This is the BBEdit Talk public discussion group. If you have a 
feature request or need technical support, please email
"supp...@barebones.com" rather than posting to the group.
Follow @bbedit on Twitter: 
--- 
You received this message because you are subscribed to the Google Groups 
"BBEdit Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to bbedit+unsubscr...@googlegroups.com.
To post to this group, send email to bbedit@googlegroups.com.
Visit this group at https://groups.google.com/group/bbedit.


Re: Grep: pattern_2 NOT preceded by pattern_1 (with pattern_1 not necessarily IMMEDIATELY to the left of pattern_2)

2018-10-13 Thread Patrick Woolsey
On Oct 13, 2018, at 13:26, F. Alfredo Rego  wrote:
> 
>> On Oct 13, 2018, at 12:08 AM, Christopher Stone  
>> wrote:
>> 
>> On 10/12/2018, at 16:03, F. Alfredo Rego  wrote:
>>> 
>>> I would like to craft an expression to find lines that contain pattern_2 
>>> NOT preceded by pattern_1
>>> (with pattern_1 not necessarily IMMEDIATELY to the left of pattern_2).
>> 
>> Hey Alfredo,
>> 
>> It's a best-practice to provide one or more real-world data-samples when 
>> making this sort of request.
>> 
>> In any case this is the sort of thing you're looking for:
>> 
>> ^(?>(?:(?!pattern_1).)*)pattern_1$
>> 
[...]


Hi Alfredo

Are your 'pattern_1' and 'pattern_2' actual arbitrary patterns, or are they 
instead strings (or sets of strings)?


Regards,

 Patrick Woolsey
==
Bare Bones Software, Inc. 


-- 
This is the BBEdit Talk public discussion group. If you have a 
feature request or need technical support, please email
"supp...@barebones.com" rather than posting to the group.
Follow @bbedit on Twitter: 
--- 
You received this message because you are subscribed to the Google Groups 
"BBEdit Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to bbedit+unsubscr...@googlegroups.com.
To post to this group, send email to bbedit@googlegroups.com.
Visit this group at https://groups.google.com/group/bbedit.


Re: Grep: pattern_2 NOT preceded by pattern_1 (with pattern_1 not necessarily IMMEDIATELY to the left of pattern_2)

2018-10-13 Thread F. Alfredo Rego
Hey Chris,

How about this?

Dear engine: 

Please look for pattern_2 in the current line. 

If the current line DOESN’T CONTAIN pattern_2, great. Skip this line 
and try the next line.

However, if the current line CONTAINS pattern_2:

Does the current line ALSO CONTAIN pattern_1 ANYWHERE BEFORE 
pattern_2 (whether immediately before or not)? 

If yes, skip this line and try the next line.

If not, select this line.


Thanks!

Alfredo

P.S.

Did you mean to use the same name for both patterns? 

Your expression uses “pattern_1” twice, whereas I used “pattern_1” for the 
first pattern and “pattern_2” for the second pattern.

Anyhow, I tried several possibilities with your expression, but  couldn’t get 
any variation to do what I would like to do.



> On Oct 13, 2018, at 12:08 AM, Christopher Stone  > wrote:
> 
> On 10/12/2018, at 16:03, F. Alfredo Rego  > wrote:
>> I would like to craft an expression to find lines that contain pattern_2 NOT 
>> preceded by pattern_1
>> (with pattern_1 not necessarily IMMEDIATELY to the left of pattern_2).
> 
> 
> Hey Alfredo,
> 
> It's a best-practice to provide one or more real-world data-samples when 
> making this sort of request.
> 
> In any case this is the sort of thing you're looking for:
> 
> ^(?>(?:(?!pattern_1).)*)pattern_1$
> 
> --
> Best Regards,
> Chris
> 
> 
> -- 
> This is the BBEdit Talk public discussion group. If you have a 
> feature request or need technical support, please email
> "supp...@barebones.com " rather than posting to 
> the group.
> Follow @bbedit on Twitter:  >
> --- 
> You received this message because you are subscribed to the Google Groups 
> "BBEdit Talk" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to bbedit+unsubscr...@googlegroups.com 
> .
> To post to this group, send email to bbedit@googlegroups.com 
> .
> Visit this group at https://groups.google.com/group/bbedit 
> .

-- 
This is the BBEdit Talk public discussion group. If you have a 
feature request or need technical support, please email
"supp...@barebones.com" rather than posting to the group.
Follow @bbedit on Twitter: 
--- 
You received this message because you are subscribed to the Google Groups 
"BBEdit Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to bbedit+unsubscr...@googlegroups.com.
To post to this group, send email to bbedit@googlegroups.com.
Visit this group at https://groups.google.com/group/bbedit.


Re: Learning HTML CSS Javascript with BBEdit12

2018-10-13 Thread BB_HTML_JS
yes it works very fine in BBedit, 
but its limited  .

if i type  this code example in my new  empty html files.
i will not get autocompletions showed  for  javascript inside tags


 Hallo BBedit 

 change color 


document.getElementById("button1").onclick =function() {
document.getElementById("div1").innerHTML="BBedit in now red !";
document.getElementById("div1").style.color="red";
   }
 







Am Donnerstag, 11. Oktober 2018 20:31:35 UTC+2 schrieb Kerri Hicks:

> Perhaps helpful to the OP, the Markup->Edit Markup panel gives you a list 
> of eligible tags. "Insert Tag" on the in-document contextual menu (I use 
> right-click to invoke it) also gives you a picklist of eligible tags.
>
> Also, depending on how your preferences are set, BBEdit doesn't require a 
> user action to trigger the autocompletion display. I didn't use a trigger 
> in the image below, I just waited half a second.
>
> [image: Screen Shot 2018-10-11 at 12.22.01 PM.png]
> [image: autocomplete.gif]
> --Kerri
>
> On Thu, Oct 11, 2018 at 11:39 AM Jean-Christophe Helary <
> brand...@gmail.com > wrote:
>
>> Regarding autocompletion for HTML/CSS/Javascript (and others), Coda (not 
>> free) and Bluefish (free software) are excellent. They both automatically 
>> display the autocompletion options as you type and let you select from a 
>> drop-down menu located at point.
>>
>> Emacs is like BBEdit, it requires user action to trigger the 
>> autocompletion display.
>>
>> Jean-Christophe 
>>
>> On Oct 11, 2018, at 23:47, DavidWeinberger > > wrote:
>>
>> No single tool is right for every job, so BBedit may not be the tool for 
>> you, at least at this point.
>>
>> It may be that the free version of BlueGriffon would suit your needs 
>> better, at least for HTML and CSS; the last time I looked it, it wasn't 
>> doing much with JavaScript editing. BlueGriffon shows dialogue boxes that 
>> list all (?) the available options for HTML and CSS elements. It also lets 
>> you edit HTML directly, or by editing its source code.
>>
>> Best of luck, and keep BBedit in mind as your needs evolve. 
>>
>> David W.
>> Long-time happy BBedit user
>>
>>
>> Blue Griffon n Wednesday, October 10, 2018 at 
>> 9:41:40 AM UTC-4, BB_HTML_JS wrote:
>>>
>>>  i gave it a tray, i load all the Languages Packages and Clipping in 
>>> BBEdit , didn't get it works like the authors apps
>>> i was hopping to use it for learning HTML,CSS, javascript corse on the 
>>> mac. 
>>>
>>> i thing bbedit ist not my right apps for that, because i found  
>>> the  completions libraries for Javascript and authors languages are 
>>>  limited, 
>>> the user have to write his own stuffs. cod-less Lang..etc. 
>>> i thing  BBedit is  Professional  strong for using it in 
>>> authors professional work on the mac.
>>> i triad   Notepad ++ , Brackets and VSCode  they  behaves just like a 
>>> IDEs.
>>> they have a gread competitions Doc Lang. Libraries inside.
>>> for my learning i have to use Brackets. 
>>>
>>> i will keep updating BBedit 12.
>>>
>>>
>> -- 
>> This is the BBEdit Talk public discussion group. If you have a 
>> feature request or need technical support, please email
>> "sup...@barebones.com " rather than posting to the group.
>> Follow @bbedit on Twitter: 
>> --- 
>> You received this message because you are subscribed to the Google Groups 
>> "BBEdit Talk" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to bbedit+un...@googlegroups.com .
>> To post to this group, send email to bbe...@googlegroups.com 
>> .
>> Visit this group at https://groups.google.com/group/bbedit.
>>
>>
>> Jean-Christophe Helary
>> ---
>> http://mac4translators.blogspot.com @brandelune
>>
>>
>> -- 
>> This is the BBEdit Talk public discussion group. If you have a 
>> feature request or need technical support, please email
>> "sup...@barebones.com " rather than posting to the group.
>> Follow @bbedit on Twitter: 
>> --- 
>> You received this message because you are subscribed to the Google Groups 
>> "BBEdit Talk" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to bbedit+un...@googlegroups.com .
>> To post to this group, send email to bbe...@googlegroups.com 
>> .
>> Visit this group at https://groups.google.com/group/bbedit.
>>
>

-- 
This is the BBEdit Talk public discussion group. If you have a 
feature request or need technical support, please email
"supp...@barebones.com" rather than posting to the group.
Follow @bbedit on Twitter: 
--- 
You received this message because you are subscribed to the Google Groups 
"BBEdit Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to bbedit+unsubscr...@googlegroups.com.
To post to this group, 

Re: Grep: pattern_2 NOT preceded by pattern_1 (with pattern_1 not necessarily IMMEDIATELY to the left of pattern_2)

2018-10-13 Thread Christopher Stone
On 10/12/2018, at 16:03, F. Alfredo Rego mailto:f.alfredor...@gmail.com>> wrote:
> I would like to craft an expression to find lines that contain pattern_2 NOT 
> preceded by pattern_1
> (with pattern_1 not necessarily IMMEDIATELY to the left of pattern_2).


Hey Alfredo,

It's a best-practice to provide one or more real-world data-samples when making 
this sort of request.

In any case this is the sort of thing you're looking for:

^(?>(?:(?!pattern_1).)*)pattern_1$

--
Best Regards,
Chris

-- 
This is the BBEdit Talk public discussion group. If you have a 
feature request or need technical support, please email
"supp...@barebones.com" rather than posting to the group.
Follow @bbedit on Twitter: 
--- 
You received this message because you are subscribed to the Google Groups 
"BBEdit Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to bbedit+unsubscr...@googlegroups.com.
To post to this group, send email to bbedit@googlegroups.com.
Visit this group at https://groups.google.com/group/bbedit.