регулярные-выражения

How do I compare the beginning of a link with a regular expression?

Hello there! The task is this: You need to compare the link contained in $_SERVER['HTTP_REFERER'] with the template, in the t ... iliar with regular expressions, the problem is created! Tell me how to correctly compose an expression for my goal! Thanks!

Replacing a substring with a regular expression

There is a string. I need to use a regular expression to wrap all matches in the span tag. I do this: $str = 'Строка для зам ... riable n in the second line. How can I fix it so that I can find any number of matches in a string and frame them with a tag?

Regular expression (prohibition of English letters)

Good evening, everyone. Please help me correctly compose a regular expression. I need to check the field so that it is imposs ... WEVER, if A-Yaa-ya is replaced by A-Za-z, then the Russian text prohibits it, and the English text prohibits it. lets you in.

Regular expression (only letters or only letters and numbers, or only letters, numbers and special characters + @ -. you can not only special characters and only numbers)

There is a regular expression: /^[a-zA-Z0-9+_@-.]$/ you can use the letters lat. the alphabet in any case you can use the l ... only characters {[1] are not allowed]} not only numbers you can't only use the characters +_@-. together with the numbers

Regular expression to the address of the VKontakte page

Help me compose a JavaScript regular expression. Here is what data should be skipped: Http://vk.com/user/http://vk.com/uservk.com/user/vk.com/userwww.vk.com/user/www.vk.com/user It is clear that "user" is any text. It can also be "id123456".

JAVA regular expressions, how to remove characters from the middle of a string and the end of a string

Help who knows "regular expressions". I have a method that cleans up the text : JSONObject clear (JSONObject input){ S ... attern1 = Pattern.compile("<br>$"); I'm racking my head for 2 days , any answer is accepted , good luck with the code!

The exact occurrence and position of the search phrase in regular expressions

Help with the regular expression. The bottom line, there are many lines from which you need to select certain ones, for examp ... igrushki/podvizhnye-igrushki-na-batareykah Thank you in advance for the hint or which way to look with regular expressions.

Checking the NAME with a regular expression [php]

There is a field Name: Maxim What regular expression should be used to make the name: ONLY from English or ONLY from Russian? no spaces,symbols, etc.! Thank you very much in advance!!

How do I set a character or the end of a string in a regular expression?

The input is supplied with strings of the form asdfsadfs=dfasfsdfd; sdfasdf dfsdff=sdfsdf; dsfasdfsdf=sdfsdf How to extract ... Match(z, @"\=(.*?)[;$]").Groups[1].Value; The " $ " sign inside a character class is not interpreted as the end of a string.

Clearing a string in javascript: removing spaces, tabs

Is it possible to clear the string by removing duplicate spaces, tabs, and line feeds, in general, so that the string is like ... for this, but it will then remove just spaces at the end and beginning of the string. Maybe there is a plugin, or a function?

Python. Working with text, frequency analysis, string formatting

I have a task ahead of me : Create a txt file, insert any English-language article from Wikipedia. Implement a ... ary array with a numeric designation of places ? And what methods can be used to replace words in the text by key and value ?

Alternately pull SIN(X) from the expression SIN (SIN(20 + 20)) + COS (20)

The problem is that the regular must pull out the first match with a paired number of parentheses. That is, according to the ... (SIN(30) - SIN(40)) Must pull: 0:SIN(20) 1:20 And from SIN(20 - SIN(40)) Must pull: 0:SIN(40) 1:40 C#, .NET language 4.0!

Replace all words in a string, except those that match the pattern. sed, awk

There is a string 14:24:14 text @vp text You need to use sed or awk or other tools At the output, leave only @vp I.e. re ... l words that do not contain @ with "", (@- always at the beginning of the word) Or find and output words in which there is @

Regular expressions in GWT

Is it possible to work with regular expressions in GWT somehow? The java.util.regex package is not available. I have sketched ... sm for templates, do they use the same rules as java.util.regex or not? That is, will all my templates work exactly the same?

Any number of any characters in notepad++

You must specify the following line "='root' && ... =" Where ... - any number of any characters How do I set any ... frame apostrophes in a special way? Sorry that I'm asking you and not Google - just in many places it is not clear written.

greedy vs lazy vs super-greedy quantifiers

I can't understand when super-greedy quantifiers are used. I don't understand how they work and why they are needed. Please e ... where searching for a single string using different types of quantifiers would give different results. Help me figure it out.

Regular expression for text

Tell me how to remove only the first " - " in the lines: 60.125-Sample Data Point - AQL -> 60.125 Sample Data Point - AQL 54.09-E-Procedure Execution_03 -> 54.09 E-Procedure Execution_03 Using a regular expression?

PHP & regexp: line feed to array

Good day, gentlemen experts! I have a block-div, with the class b-cat-marker js-schedule. It has an attribute data-ch that co ... ribute into an array, for example $data["position"]=49; $data["id"]=49; $data["title"]="....."; PS: no experience in regexp.

VBA: a regular expression for highlighting specific parts of a string

Please tell me how for Excel VBA should look like a regular expression to select from the text of the form 12345.12345TEXT123 ... (text) But it seems that I do not understand anything in regular expressions at all : (because it finds only the full string

replaceAll and backslashes

Today I was working on the problem of quotation marks in SQL queries in Java (injection) and found that in order to get \' af ... Why is this happening? I checked with System.out.println('\\');, where the console returned \, that is, the correct result.