Re: I need a better regex with a literal in it

2021-10-23 Thread ToddAndMargo via perl6-users
On 10/23/21 21:31, Francis Grizzly Smit wrote: On 24/10/2021 12:59, ToddAndMargo via perl6-users wrote: On 10/23/21 18:03, Bruce Gray wrote: As to your "null string", I am glad that you resolved your problem, but I cannot get this code to hang: $NewRev ~~ s/ ^ .*? ('Release Notes V') //;

Re: I need a better regex with a literal in it

2021-10-23 Thread ToddAndMargo via perl6-users
On 10/23/21 19:02, ToddAndMargo via perl6-users wrote: On 10/23/21 18:03, Bruce Gray wrote: ^ .*? Hi Bruce, I am not seeming the difference between    ^ .*?   and    .*? `.*?` means to search to the first instance of the string.  `^` means to start at the beginning.   I do not see the

Re: I need a better regex with a literal in it

2021-10-23 Thread Francis Grizzly Smit
On 24/10/2021 12:59, ToddAndMargo via perl6-users wrote: > On 10/23/21 18:03, Bruce Gray wrote: >> As to your "null string", I am glad that you resolved your problem, >> but I cannot get this code to hang: >> $NewRev ~~ s/ ^ .*? ('Release Notes V') //; >> , just by preceding it with this

Re: I need a better regex with a literal in it

2021-10-23 Thread ToddAndMargo via perl6-users
On 10/23/21 18:03, Bruce Gray wrote: As to your "null string", I am glad that you resolved your problem, but I cannot get this code to hang: $NewRev ~~ s/ ^ .*? ('Release Notes V') //; , just by preceding it with this line: $NewRev = ''; , so I may misunderstand the nature of

Re: I need a better regex with a literal in it

2021-10-23 Thread Bruce Gray
> On Oct 23, 2021, at 7:48 PM, ToddAndMargo via perl6-users > wrote: > > On 10/23/21 17:37, Bruce Gray wrote: >>> On Oct 23, 2021, at 6:43 PM, ToddAndMargo via perl6-users >>> wrote: >>> >>> Hi All, >>> >>> Wish I had a Q[;;;] expression inside a regex, but I don't >>> >>> This is my

Re: I need a better regex with a literal in it

2021-10-23 Thread ToddAndMargo via perl6-users
On 10/23/21 17:37, Bruce Gray wrote: On Oct 23, 2021, at 6:43 PM, ToddAndMargo via perl6-users wrote: Hi All, Wish I had a Q[;;;] expression inside a regex, but I don't This is my notes on how to do a regex with a special characters in it: Regex with literals in it:

Re: I need a better regex with a literal in it

2021-10-23 Thread Bruce Gray
> On Oct 23, 2021, at 6:43 PM, ToddAndMargo via perl6-users > wrote: > > Hi All, > > Wish I had a Q[;;;] expression inside a regex, but I don't > > This is my notes on how to do a regex with a special > characters in it: > > Regex with literals in it: >$JsonAddr ~~ s| (';') .*

Re: I need a better regex with a literal in it

2021-10-23 Thread ToddAndMargo via perl6-users
On 10/23/21 16:56, Kevin Pye wrote: Does $NewRev ~~ s/ .* 'Release Notes V' // have the problem? I fixed the hang. I was giving the regex a zero length file. $NewRev ~~ s/ .* "Release Notes V" // worked. Where I get into problems is with things like `` and `` and such. So

Re: I need a better regex with a literal in it

2021-10-23 Thread Kevin Pye
Assuming that all you are trying to do is to delete everything at the start of a line up to and including that string, the first thing I would do is get rid of all the superfluous parts of the regex. Does $NewRev ~~ s/ .* 'Release Notes V' // have the problem? ".*" means any number of