Регулярные выражения иногда могут быть просто монструозными. Выглядеть это может крайне запутанно. Сами регэкспы и без того история непростая, а когда это длинный паттерн на несколько десятков знаков, разобрать там что-либо становится не просто.
Но на помощь приходит Python и его стремление сделать нашу жизнь проще!
В функциях регулярок можно после паттерна указывать флаги, один из которых позволяет писать паттерны более свободно. А именно, добавлять пробелы и переносы, которые будут игнорированы. В результате мы можем разбить паттерн на строки и добавить комментов.
Чтобы это сработало нужно добавить флаг re.VERBOSE. Пробелы в паттерне теперь следует указывать явно спец символами.
Согласитесь, что даже с именованными группами а таком виде регэкспа выглядит вполне сносно 😉.
#tricks#regex
#DEGO/USDT analysis :
#DEGO is currently in a downtrend, trading below its 200 EMA and encountering resistance. This suggests a potential continuation of the downtrend, for short entry opportunity wait for pullback.
TF : 4h
Entry : $1.537
Target : $1.270
SL : $1.712
#DEGO/USDT analysis :
#DEGO is currently in an uptrend, consistently reaching new highs while trading above the support zone. Following a strong impulsive move, the price has undergone a correction phase. It is now anticipated to bounce from this level and continue rising, aiming to test previous highs. For a long entry, wait for a breakout above the $1.996 level.
TF : 4H
Entry : $1.996
Target : $2.490
SL : $1.757
#DEGO/USDT analysis :
#DEGO is currently in an uptrend, forming higher highs and higher lows above the 200 EMA. The price is presently consolidating above the support zone and is expected to bounce from there to sustain its bullish momentum and test the previous swing high.
TF : 1h
Entry : $1.640
Target : $1.696
SL : $1.608
🚀🚀100% Huge Profit on #DEGO/USDT as it has hit all the profit target - The trade has been closed
👁🗨Contact @primemod to enter the premium group & make daily gains