Questions tagged [Regular expressions] (1770)

2
answers

How to get substring in js in a regular season?

Good afternoon. There is a line: "Organix (dry food) for dogs of small breeds with chicken, Adult Dog Small Breed Chicken (12kg)" It is necessary to obtain two lines. The first line. The first line should meet the following conditions: Line contained in parentheses "(" and ")" The string contains numbers we should g...
lilla.Gutmann asked April 19th 20 at 12:47
2
answers

As the regular season do not allow to enter 0 only the first character?

and the second, third, and so on - can now 0 do not enter restrictions on entering characters leave https://jsfiddle.net/zdLx5yh6/
Lizeth_Kling53 asked April 19th 20 at 12:38
1
answer

Why the regular season with Cyrillic not working?

There is for example the expression "zai Banzai" if I use the regular season \bзай\b it will not work on the word "Zay", if you do the same in the Latin alphabet everything is OK. I'm not a guru regexps, but can in the regular season to indicate the use of Unicode? There is an old Perl crm and there is a filter regexps, but...
ernestina73 asked April 19th 20 at 12:33
1
answer

Why preg_match is not working?

If I write PHP code if (!preg_match('/\/ettevote\/filter\/abc\/([A-Za-z0-9-&ŠšŽžÕõÄäÖöÜü])/', $_SERVER['REQUEST_URI'], $code)) { die('Not found!'); } and open the link /et/ettevote/filter/abc/ü , it gives NOT FOUND. Does not work it is the letter ü, and with any usual letter latinia a-z works. How to fix?
santiago.Boehm asked April 19th 20 at 12:32
1
answer

How to parse this log?

Hello. Help to parse log Is the status log from openVPN like this. ivanov.as IP_addres,56924339,46404603,Thu Apr 16 07:20:32 2020 petrov.da,IP_addres,26209226,320310272,Thu Apr 16 07:48:03 2020 robt.mv IP_addres,341887484,1000952454,Thu Apr 16 08:08:04 2020 Bash or regular expressions need to read the end-user for exampl...
miller asked April 19th 20 at 12:24
1
answer

What regular expression to clean up the phone number?

How it will look regular expression for cleaning a phone number of blanks, parentheses, and hyphens? +7 (111) 111-11-111 This does not help https://regex101.com/r/DM2Nyg/2/ console.log("+7 (111) 111-11-111".replace(/(\s|\(|\)|-)/, "));
Mazie asked April 19th 20 at 12:14
2
answers

How do you know that the substring is not found in the text?

want to find not completely downloaded a web page, you need to determine that the tag </body> is not present in the text important! without using PHP or other languages, only a regular expression
Bianka asked April 19th 20 at 12:13
1
answer

Comparing strings is JS?

const str1 = 'Regular expression' const str2 = 'Regular reference' The second constant is omitted the letter and. Need to compare 2 rows if different by 1.2 character more true to false UPD: ready-made algorithms
khalid54 asked April 19th 20 at 12:07
1
answer

How to cut a regular expression?

html_content = "<div style=\"padding: 0;\"> <blockquote><span edit=\"false\">test</span></blockquote> </div>" html_content.gsub!("<span edit=\"false\">", ") html_content.gsub!(/<\/span><\/blockquote>/i, "</blockquote>") html_content.gsub!(/blockquote>/i, "bloc...
Bernita asked April 19th 20 at 12:07
1
answer

How to find all the numbers in the line after the semicolon?

Help out, last gyrus Dolman, a bunch I read but never entered. String example: "8 iPhone; CPU iPhone OS 11_4_1 like Mac OS X; TELE2RU-SUBSCRIBER-POOL-NET; Tele2 Russia IP Network (NIN)" You need to find all the numbers after the first semicolon. How to find everything after the first ";" - found how to find all the number...
Lincoln_Grant6 asked April 19th 20 at 12:03