REGEX: How to condition replacement based on what was captured and how to replace an earlier part of an expression ONLY if a subsequent part was also replaced?

Hi everyone!

I am learning Regex and I have a couple of quick questions.

1) How can I condition my replacement depending on what was captured in the 2nd capturing group (men|women) below?

(clothing|products) for (men|women)

For example, how to swap men for boys and women for girls?

I know there is an expression that is something like (?(if)then|else), which I never used before, but how can I compare the contents of group "\2" in the if part? Is there a "equals" operator?

and another:

2) How can I replace an earlier part of an expression ONLY if a later part was also replaced? For example:

For example:

>(a)? ((really)?|(big)?|(old)?|(green)?|(antique)?|(car)?))?( that)?( rest of sentence)?

any word in the first part of the part of the sentence can be removed without affecting the general meaning. How can I replace the "a" at the beginning of the sentence ONLY if something was replaced afterward so that a single "a" is never replaced but every single other part is replaced if it appears by itself?

How can I accomplish this in one single expression?

Thank you very much!

πŸ‘︎ 5
πŸ’¬︎
πŸ‘€︎ u/JoZeHgS
πŸ“…︎ Nov 03 2021
🚨︎ report
Need Korean to English translation for this Sonogashira coupling conditions and subsequent deprotection-- Thanks in advance
πŸ‘︎ 19
πŸ’¬︎
πŸ‘€︎ u/rebonsa
πŸ“…︎ Aug 26 2021
🚨︎ report
"If you achieve the first condition at the end of any subsequent turning points, you score 1VP" tac ops - score limit?

So if I understand this correctly the RAW here is that you can keep scoring these tac ops indefinitely. Wouldn't this clause make these tac ops significantly better that most other tac ops?

So theoretically "hold the line" and "central control" could net you 8 VPs together? Is there something I've missed?

πŸ‘︎ 5
πŸ’¬︎
πŸ‘€︎ u/FinestSeven
πŸ“…︎ Oct 03 2021
🚨︎ report
Instead of putting something on top to float for subsequent flushes has anyone tried just flipping the cake in the water and leaving it like that until you drain? I figure it probably won’t make a difference but might help surface conditions in the first few days when I flip it back.
πŸ‘︎ 30
πŸ’¬︎
πŸ“…︎ Mar 13 2021
🚨︎ report
General questions.. for discoloration, does it have more to do with genetics or could it be due to being a subsequent flush? Or different conditions? Also* has anyone else experienced differences in mushroom size coinciding with bin size?
πŸ‘︎ 5
πŸ’¬︎
πŸ‘€︎ u/staroza-
πŸ“…︎ Mar 24 2021
🚨︎ report
My hawk sustained colossal damage during adverse atmospheric flight conditions (and subsequent difficulties), the landing gear was undamaged thankfully. imgur.com/a/pruIjgl
πŸ‘︎ 5
πŸ’¬︎
πŸ‘€︎ u/Acrosspages
πŸ“…︎ Feb 06 2021
🚨︎ report
For a multi-page report, is it possible to drill through from page 1 to page 2, and have those same filter conditions automatically applied to not just page 2 but subsequent pages (3, 4, 5, etc) without having to go back to page 1 and re-drill?

It may have a simple solution that I’m just overlooking, but I’ve found no resources with a similar request and figured I’d check here to see if it’s even possible. Is it in fact doable to have the filter settings from the target page of a drill through cascade across other pages and have the same filter settings? My first idea was perhaps synced slicers but that doesn’t seem to be behaving quite right.

πŸ‘︎ 12
πŸ’¬︎
πŸ‘€︎ u/chrobbin
πŸ“…︎ May 05 2020
🚨︎ report
How bad were the working conditions in the US that led to the Haymarket Affair and the subsequent Labor Day?

I heard that working conditions were really bad during the time in history, which led to the Haymarket Affair and the subsequent formation of Labor Day.

But these articles don't talk about the working conditions in detail.

Can someone explain in comprehensive yet brief detail how the working condition was at that time? For instance, how long were the hours, the breaks, the work intensity, the subjugation etc?

Also, does it mean that in previous decades and centuries before the Industrial revolution the working conditions were better?

πŸ‘︎ 3
πŸ’¬︎
πŸ‘€︎ u/Experimentalphone
πŸ“…︎ Oct 31 2020
🚨︎ report
Mama treats the two big babies the same as her subsequent litter and seemingly unbothered by the cramped conditions. The two big babies have no intention of giving up the box or nursing.
πŸ‘︎ 36
πŸ’¬︎
πŸ‘€︎ u/gelfbride73
πŸ“…︎ May 21 2020
🚨︎ report
Unusual climate conditions influenced WWI mortality and subsequent Spanish flu pandemic eurekalert.org/pub_releas…
πŸ‘︎ 8
πŸ’¬︎
πŸ‘€︎ u/canrebuildhim
πŸ“…︎ Sep 25 2020
🚨︎ report
Unusual climate conditions influenced WWI mortality and subsequent Spanish flu pandemic eurekalert.org/pub_releas…
πŸ‘︎ 3
πŸ’¬︎
πŸ‘€︎ u/canrebuildhim
πŸ“…︎ Sep 25 2020
🚨︎ report
A new study has found that the longer a child lives in poorer circumstances, the higher their subsequent risks for self-harm and violent criminality, and vice versa for time spent living in affluent conditions. thelancet.com/journals/la…
πŸ‘︎ 100
πŸ’¬︎
πŸ“…︎ Oct 10 2018
🚨︎ report
Every enclosed system has a set of initial conditions that determine all subsequent states, even the universe
πŸ‘︎ 4
πŸ’¬︎
πŸ‘€︎ u/boylancl
πŸ“…︎ Mar 21 2020
🚨︎ report
...the jet stream's wavelike course in winter and subsequent extreme weather conditions cold air outbreaks in Central Europe and North America are the direct result of climate change sciencedaily.com/releases…
πŸ‘︎ 95
πŸ’¬︎
πŸ‘€︎ u/Goran01
πŸ“…︎ May 29 2019
🚨︎ report
Therapy encouraged me to get back into art as a way to express what I’m feeling emotionally & physically after a rare brain condition & subsequent surgery changed everything about my life. This is my visualization of what I call the Creeping Suck. (More description in comments) (Acrylic on canvas)
πŸ‘︎ 41
πŸ’¬︎
πŸ‘€︎ u/Ruffffian
πŸ“…︎ Jul 26 2019
🚨︎ report
[USG ANNOUNCE] The following are conditions for the ending of Term 2 AY 2019-2020 from the Vice Chancellor of Academics. Subsequent Helpdesk Announcements shall be issued to provide additional details on deferred grades and dropping. imgur.com/gallery/qBhkgjW
πŸ‘︎ 3
πŸ’¬︎
πŸ‘€︎ u/R3dCzar
πŸ“…︎ Apr 06 2020
🚨︎ report
Question - Real Property - How to think about the difference between a Defeasible Fee Simple Determinable and a Defeasible Fee Simple Subject to a Condition Subsequent?

I understand that a Defeasible Fee Simple Determinable (DFSD) is durational ("until", "as long as", "while", "during") whereas a Defeasible Fee Simple Subject to a Condition Subsequent (DFSSCS) is conditional ("but if", "so long as", "conditioned upon", "provided that") but I still have some trouble conceptualizing the difference.

How about it conceptualizing:

DFSD as having a condition subsequent on the right of possession (because it automatically ends at the time the condition is met); and

DFSSCS as having a condition precedent on the grantor's Right of Entry.

The thing is, a condition subsequent is an occurrence that extinguishes a right or duty. In the case of a DFSSCS, nothing happens when the condition subsequent is met, whereas with a DFSD, the right to possession automatically terminates when a condition subsequent is met. So, for a DFSSCS, does it not make more sense to think of it like a condition precedent to the Right of Entry, which is then a condition subsequent to the right of possession?

πŸ‘︎ 7
πŸ’¬︎
πŸ“…︎ Apr 20 2019
🚨︎ report
Damaging e-mails have revealed that Geithner urged AIG to withhold crucial information about the deterioration of its financial condition in the lead up to its demise and subsequent 100 cent on the dollar backdoor bailout of its counterparties. This was looting and a cover-up plain and simple. nakedcapitalism.com/2010/…
πŸ‘︎ 528
πŸ’¬︎
πŸ‘€︎ u/winstonsmith
πŸ“…︎ Jan 07 2010
🚨︎ report
[September 8, 1919] An overwhelming yes vote by Boston police to walk off the job, striking for better working conditions and the right to form a union, led to subsequent spasms of violence, leading to State Guard troops descending on Scollay Square during the Boston Police Strike of 1919.
πŸ‘︎ 4
πŸ’¬︎
πŸ‘€︎ u/cabeachgal
πŸ“…︎ Sep 08 2019
🚨︎ report
USA's Zack Test in stable condition after head injury vs Uruguay and subsequent surgery. usarugby.org/2017/02/zack…
πŸ‘︎ 16
πŸ’¬︎
πŸ‘€︎ u/PetevonPete
πŸ“…︎ Feb 06 2017
🚨︎ report
Study: Aspirin is linked with increased risk of heart failure. This is the first study to report that among individuals with a least one risk factor for heart failure, those taking aspirin were more likely to subsequently develop the condition than those not using the medication. escardio.org/The-ESC/Pres…
πŸ‘︎ 147
πŸ’¬︎
πŸ‘€︎ u/rustoo
πŸ“…︎ Nov 23 2021
🚨︎ report
Not sure if anyone is interested, but I had the same condition and subsequent surgery that Percy Harvin had. AMA?
πŸ‘︎ 31
πŸ’¬︎
πŸ‘€︎ u/TheGreenShepherd
πŸ“…︎ Jan 01 2014
🚨︎ report
Would the word 'unless' signify a fee simple determinable or fee simple a condition subsequent?

Example: O gives Blackacre to A unless aliens land

My friend and I are in an argument about it.

πŸ‘︎ 3
πŸ’¬︎
πŸ‘€︎ u/antjelly
πŸ“…︎ Feb 12 2016
🚨︎ report
What in the world is the difference between a fee simple determinable and a few simple subject to condition subsequent?

For fee simple determinable, I have that the fee simple lasts as long as a certain condition is met and once it is not met, it goes back to the grantor's estate. For fee simple subject to condition subsequent, I have that the fee simple lasts until a certain, named event occurs. Am I off?

To me, the two seem the same. For instance, if a hypo says "John conveys to Tim, but if Bill graduates from medical school, then to Bill." You could argue that its a fee simple determinable because as long as the condition of Bill not having graduated from med school is met, it is Tim's. But it could definitelt also be a fee simple subject to condition subsequent because the certain, named event that must occur is Bill's med school graduation. Do you just argue both on an exam?

πŸ‘︎ 5
πŸ’¬︎
πŸ‘€︎ u/suchlawschool
πŸ“…︎ May 14 2014
🚨︎ report
HōkΕ«leΚ»a to Sail to HawaiΚ»i Island for Two-Month Visit. Due to weather conditions, HōkΕ«leΚ»a’s departure from Sand Island, OΚ»ahu, and subsequent arrival to HawaiΚ»i Island were postponed. hokulea.com/hokulea-sail-…
πŸ‘︎ 2
πŸ’¬︎
πŸ‘€︎ u/Pulelehua
πŸ“…︎ Mar 26 2018
🚨︎ report
JPR study: Democratic regimes that come into being as a result of a nonviolent resistance campaign are less prone to democratic breakdown. The organizational culture of NVR campaigns spills over to the subsequent democratic regime fostering conditions favorable for democratic survival. jpr.sagepub.com/content/5…
πŸ‘︎ 11
πŸ’¬︎
πŸ‘€︎ u/smurfyjenkins
πŸ“…︎ Nov 14 2016
🚨︎ report
In Athens, 300 non-documented migrants, mostly from the Maghreb, have entered the 35th day of a hunger strike. Many have been taken to hospital in pre-comatose condition and are reaching a state of non-reversible organ failure and subsequent death guardian.co.uk/commentisf…
πŸ‘︎ 17
πŸ’¬︎
πŸ‘€︎ u/ehok
πŸ“…︎ Mar 04 2011
🚨︎ report
Is it possible to set a conditional order in this manner: sell order w/ subsequent limit buy order?

This probably is wishful thinking, but I'm wondering if there's a way I can automate a conditional series of orders to help me more effectively scalp a stock. Let me provide an example below:

I own 100 shares of Stock X that I wish to continue holding for the long term. The current price is $50.00 and I believe it is going to reverse temporarily, so I would like to attempt to scalp my shares and repurchase at a lower price (let's say hypothetical support at $49.00), capturing the difference as profit. However, if the price action moves immediately against me, I would like to repurchase the shares as quickly as possible to minimize my loss.

Currently, I sometimes attempt to do this manually using the Active Trader tab and it is a stressful experience. I plan and watch the chart as carefully as possible for my sell indicator(s), then place a stop loss limit order just below the current price (or simply click the SELL MKT button at the current price) and then, once it's filled, immediately try to set a limit buy order on the grid at or just above the price that was just filled. If the candles move in my favor, I progressively adjust the buy order lower and lower on the grid along with the price action and all is well. However, if the candles move quickly against me, it's a mad scramble to determine if and where I should buy back in and at how much of a loss. Hope that makes sense.

Is there a better way to go about this? Going back to my initial question, in my dream scenario, I could set a sell order somehow using ToS that, upon filling, would also immediately place a limit buy order at a predetermined increment of price higher to serve as a stop loss for the scalp. This would remove some of the inherent risk in both user error and the amount of time it takes me to manually set this myself. Those one minute candles can move very quickly on a volatile stock and automating this would be tremendously helpful.

Feedback would be greatly appreciated! Thank you so much for your time and patience.

πŸ‘︎ 2
πŸ’¬︎
πŸ‘€︎ u/712Jefferson
πŸ“…︎ Oct 04 2021
🚨︎ report
Wiltold Pilecki voluntarily was captured by Nazi’s during WWII in order to infiltrate Auschwitz. Concentration camps were known, but the true atrocities were not. He collected intelligence under horrible conditions. Then somehow escaped and reported his findings to Poland and subsequently the world.
πŸ‘︎ 41
πŸ’¬︎
πŸ‘€︎ u/theswervepodcast
πŸ“…︎ Jul 26 2021
🚨︎ report
Wiltold Pilecki voluntarily was captured by Nazi’s during WWII in order to infiltrate Auschwitz. Concentration camps were known, but the true atrocities were not. He collected intelligence under horrible conditions. Then somehow escaped and reported his findings to Poland and subsequently the world. youtu.be/ph-WozQddL0
πŸ‘︎ 16
πŸ’¬︎
πŸ‘€︎ u/theswervepodcast
πŸ“…︎ Jul 26 2021
🚨︎ report
TIL the 9th president of the USA William Henry Harrison, contracted and subsequently died of pneumonia after performing A exhausting 8,445 word speech in subzero conditions with no coat or gloves for warmth. history.com/this-day-in-h…
πŸ‘︎ 71
πŸ’¬︎
πŸ‘€︎ u/furyfornow
πŸ“…︎ Aug 08 2020
🚨︎ report
How can you make it so first rule in conditional formatting overrides the subsequent rules?

I am trying to create a checklist of up coming tasks. Each task has a due date and a checkbox in the two rows below it. I want the column to be highlighted in red if the task is past due (if due date is before today's date). However, if the box is checked (and thus completed) I don't it to turn red. See link below.

Another smaller issue is that the conditional formatting is only changing a specific cell, rather than the entire section of the column I was hoping it would change.

Here is a link that will show you what I am referring to.

Any help would be greatly appreciated!

πŸ‘︎ 4
πŸ’¬︎
πŸ‘€︎ u/sour_almonds
πŸ“…︎ Dec 13 2020
🚨︎ report
Suspected case of Covid19 in Indonesia died after condition worsen rapidly, tested negative. This is the third suspected case who died of "condition worsen rapidly" and subsequently tested negative after death today.line.me/id/article/…
πŸ‘︎ 82
πŸ’¬︎
πŸ‘€︎ u/daysof_I
πŸ“…︎ Mar 03 2020
🚨︎ report
[Shelburne] "It's also against league rules to have conditioned trades. The Pelicans cannot say to the Lakers "we'll wait until July 30th" because it's not up to them, any trade they make subsequently cannot be conditional to them." twitter.com/ShowtimeForum…
πŸ‘︎ 83
πŸ’¬︎
πŸ‘€︎ u/LonzoBBBall
πŸ“…︎ Jun 17 2019
🚨︎ report
On this day, 10th March of 1906, a mining disaster occurred in France in which 1060 workers were killed in a coal dust explosion. 45,000 miners subsequently went on strike for 55 days against horrific working conditions and the government brought in the army to crush the strike.
πŸ‘︎ 78
πŸ’¬︎
πŸ‘€︎ u/inishmannin
πŸ“…︎ Mar 10 2020
🚨︎ report
How to condition replacement based on what was captured and how to replace an earlier part of an expression ONLY if a subsequent part was also replaced?

Hi everyone!

I am learning Regex and I have a couple of quick questions.

1) How can I condition my replacement depending on what was captured in the 2nd capturing group (men|women) below?

(clothing|products) for (men|women)

For example, how to swap men for boys and women for girls?

I know there is an expression that is something like (?(if)then|else), which I never used before, but how can I compare the contents of group "\2" in the if part? Is there a "equals" operator?

and another:

2) How can I replace an earlier part of an expression ONLY if a later part was also replaced? For example:

For example:

>(a)? ((really)?|(big)?|(old)?|(green)?|(antique)?|(car)?))?( that)?( rest of sentence)?

any word in the first part of the part of the sentence can be removed without affecting the general meaning. How can I replace the "a" at the beginning of the sentence ONLY if something was replaced afterward so that a single "a" is never replaced but every single other part is replaced if it appears by itself?

How can I accomplish this in one single expression?

Thank you very much!

πŸ‘︎ 2
πŸ’¬︎
πŸ‘€︎ u/JoZeHgS
πŸ“…︎ Nov 04 2021
🚨︎ report

Please note that this site uses cookies to personalise content and adverts, to provide social media features, and to analyse web traffic. Click here for more information.