I would use regex much more often once I have solved this fundamental 
question: 

How to combine with logical AND in RegExp? 

For logical OR it's as easy like this: 

pattern_a|pattern_b 


This means literal searching for pattern "pattern_a" OR "pattern_b".

(?=.*pattern_a)(?=.*pattern_b).*


Is it easier to encode?


On Wednesday, September 25, 2019 at 4:40:45 PM UTC+2, Mark S. wrote:
>
> regex is like a little, tiny condensed programming language. You can do a 
> lot with just a couple hour's study.
>
> I never got to the point of understanding "look-ahead" and "look-behind" 
> features, but there's a lot you can do with just the basics.
>
> prefix[b] will tell you if there's a string starting with letter "b", but 
> it won't tell you if there's a word in the middle of the string that starts 
> with "b".
>
> This could form the basis if you wanted, for instance, to alphabetize all 
> the words in a Shakespeare sonnet.
>
> Thanks!
>
> On Wednesday, September 25, 2019 at 5:48:22 AM UTC-7, TonyM wrote:
>>
>> TT
>>
>> Is this many ways to skin a cat an argument in favor of [prefix[b]]
>>
>> I do see the value of regex and its on my list of must learn but it does 
>> help me understand what people with dyslexia face. Every characters meaning 
>> changes according to most of the characters that follow or proceed it. 
>> There is a hump one must get over before reading regex does not confuse the 
>> reader.
>>
>> What is critical in my view is to show when regex does a job that can not 
>> be done with the standard operators, or does it better.
>>
>> Regards
>> Tony
>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/700776e8-2c44-47ad-866c-8d1adc0879fb%40googlegroups.com.

Reply via email to