REgex

  • 12 October 2021
  • 7 replies
  • 14 views

HI

 

why does not the start of line character ^ work in the find command when searching through regular expressions?

 

1

Advertology.Ru

Ready to meet the "Eternals" (article)

01.10.2021

Moscow

2

Rambler - Finance (finance.rambler.ru)

Offers a service for busy clients (article)

01.10.2021

Moscow

 

First line of the message number, the second line is always the name of the media, the third line and others until the date is the essence of the article when I try to get the name of the media via ^d{1,3}s([S ]+) on the https site: //regex101.com/ everything works fine, but in the command it does not work with the ^ symbol, it is worth removing this symbol and everything starts working, but accordingly it looks for something completely different from what I need, why should it be so?25656iB0AE26907EE863BA.jpg


7 replies

20.9 version

@Dmitry Dmitry​  one of my collegues, @Artur Martirosyan​  suggested getting that result splitting the variable with line breaks "
". Do you want to try?

@ayelet Gazit​ @Artur Martirosyan​ 

do not quite understand, can I have an example?

Here is Artur's reply:

So, if the text is like this:

"1

TV.ru

Title

Moscow

"Then splitting this text with line breaks will give you each word separately.

In programming languages, the line breaks usually are recognized as "
" or in Kryon he may use "Enter" as a delimiter. He needs to try both to see what's working. (edited) 

(reply from Artur)

Hi Dima,

 

I am not sure how your RegEx worked on your end on the //regex101.com/ but I tried the same with the same text on the same regex101.com page and it didn't work.

I have written another RegEx that works in Kryon Studio as well as on the mentioned website. Please see the attached wizard that contains the solution. it gets all the names of the media.

super. thanks!

Reply