Yeah, I know. I was just being a bit flip. If you need what it can do,
you can hardly do without. And sometimes you can find a way to format the
regex string that makes it a lot more clear.
On Monday, August 17, 2020 at 12:19:13 PM UTC-4, Edward K. Ream wrote:
>
>
>
> On Mon, Aug 17, 2020 at
On Mon, Aug 17, 2020 at 9:53 AM vitalije wrote:
re.compile(r'(/\*(:?.*?)\*/)')
>
Thanks for this. Apparently the second group, (.*) is causing the problem.
Without this second group, the original first group works!
This is good news, because the second group can easily be computed. Stay
On Mon, Aug 17, 2020 at 11:04 AM Thomas Passin wrote:
> "When you use an regex to solve a problem, then you have another problem".
>
This aphorism is misleading. Believing it was one of the worst mistakes I
have made in my coding career. regex's are usually the simplest way to
detect patterns.
"When you use an regex to solve a problem, then you have another problem".
On Monday, August 17, 2020 at 11:35:08 AM UTC-4, vitalije wrote:
>
>
>
> On Monday, August 17, 2020 at 4:59:39 PM UTC+2, Thomas Passin wrote:
>>
>> Nested comments aren't allowed in js and ts, are they?
>>
>>
> Probably
On Monday, August 17, 2020 at 4:59:39 PM UTC+2, Thomas Passin wrote:
>
> Nested comments aren't allowed in js and ts, are they?
>
>
Probably not, but that was not my point.
Looking again in the original regex it seems the first group would match
any number of sequences of triplets containing
Nested comments aren't allowed in js and ts, are they?
On Monday, August 17, 2020 at 10:53:37 AM UTC-4, vitalije wrote:
>
> re.compile(r'(/\*(:?.*?)\*/)')
>
> The inner comment text must be grouped separately to be able to apply *?
> operator on just the inner characters. Without this grouping,
re.compile(r'(/\*(:?.*?)\*/)')
The inner comment text must be grouped separately to be able to apply *?
operator on just the inner characters. Without this grouping, *? operator
applies to all matched characters to the left. Your regex would match
smaller part if you have had nested comments.
On Monday, August 17, 2020 at 9:49:13 AM UTC-4, Edward K. Ream wrote:
>
> I would like a regex that finds complete and *disjoint *typescript
> multiline block comments
>
> The following does not work, because the flags do not play well together.
>
> re.compile(r'(/\*.*?\*/)(.*)', re.DOTALL |
On Monday, August 17, 2020 at 8:49:13 AM UTC-5, Edward K. Ream wrote:
I would like a regex that finds complete and *disjoint *typescript
> multiline block comments
>
If you are interested in this puzzle, I recommend using https://pythex.org/
to play with possible solutions.
Edward
--
You
On Oct 11, 6:23 am, Edward K. Ream edream...@gmail.com wrote:
I've never liked regular expressions. Their only virtue is
conciseness--otherwise, they seem way under-powered.
They also execute faster than other solutions, typically.
A valid observations, especially if icon-like
On Sat, Oct 10, 2009 at 11:25 AM, Ville M. Vainio vivai...@gmail.comwrote:
On Sat, Oct 10, 2009 at 6:50 PM, Edward K. Ream edream...@gmail.com
wrote:
I've never liked regular expressions. Their only virtue is
conciseness--otherwise, they seem way under-powered.
They also execute faster
On Oct 10, 10:50 am, Edward K. Ream edream...@gmail.com wrote:
As an alternative, I have been playing with a python
library.http://www.wilmott.ca/python/patternmatching.html
The real motivation for this was as better platform for a refactoring
library. It remains to be seen whether this
On Sat, Oct 10, 2009 at 6:50 PM, Edward K. Ream edream...@gmail.com wrote:
I've never liked regular expressions. Their only virtue is
conciseness--otherwise, they seem way under-powered.
They also execute faster than other solutions, typically.
Find all *words* t that are not preceded by
13 matches
Mail list logo