Category "regex"

failregex misses entries

I need to hit ›page not found‹ log entries like this one: 185.220.100.252 - - [13/May/2022:10:03:58 +0200] "GET /EXPLOIT.php HTTP/1.1" 404 14780 "

In Telegraf how to include only specific values of a tag

I am using a prometheus plugin in Telegraf to get the data from promitor and push it to InfluxDB. However, as per my requirement there is one tag named as "reso

Regex catch bad octet in IP

Hi can someone explain me why last octet of the IP if 01 or 001 is not capched by this regex ? (\.?)([2-9][5-9][6-9]|[3-9][0-9][0-9]|0[0-9][0-9]?)($|\.) Debug

How to search for dialogues in quotation marks and dashes?

I would like to search for dialogues in between quotation marks and dashes, but I can't seem to code it. Regarding dialogues marked by quotation marks, I have f

Jenkins groovy regex pattern search and match in commit message not working as expected

I'm working with this pipeline where running tests from a commit message should be an option. I'm a novice in groovy and regex, but I have managed to get matche

How to convert 10 digits with this format XXX-XXX-XXXX to US formal format that looks like (XXX) XXX-XXXX using Python3 Regex sub

This is my try, it actually put the first and seconds groups of 3 digits between parenthesis while I only need to put the first group only between parenthesis

Need to select values which do not contain '-' or '[0-9] or '.' by example not like '-123.423' using Athena [closed]

need to find values in numeric_column(string) that don't contain '-' or '[0-9] or '.' I am a little bit novice in Athena... so honestly don't

What does ?! mean?

What does the ?! mean in the following regex expression? new RegExp('http:\/\/(?!' + location.hostname + ')')

R: Match an odd number of repetitions

I would like to match a string like \code, but not when the backslash is escaped. I think that one way of doing this could be matching an odd number of backslas

How to match start and end of input with std::regex on Visual Studio

From what I understand, C++ regex symbol ^ should match only the beginning of input and $ should match only the end of input. This can be changed to match begin

Is it possible to use only lookaround to match characters that are not repeated immediately before and after?

For example, to match the first slash after the domain name in the URL. Intent: Only match '/' in '.com/...' but not any '/' in 'https://'. url = 'https://examp

Grep exclude count of occurence match between comments <!-- --> of curl body

I am very new to linux & bash script. I'm trying to read an xml file using curl command and count the number of occurrence of the word </entity> in it

Match multiline text using regular expression

I am trying to match a multi line text using java. When I use the Pattern class with the Pattern.MULTILINE modifier, I am able to match, but I am not able to do

Adaptive Card Input.Date

How to Set Todays Date as Minimum value in Input.Date Action of Adaptive Card. When a user select date ,all Backdates & Previous dates need to be blocked an

How to extract all words of a camel cased string with a regular expression?

Assume I have a string that consists of multiple words. These words aren't separated by spaces, but every word starts with a capital letter. This type of naming

Convert regexp.FindStringIndex results to character indices

The regexp.FindStringIndex(s string, n int) []int function returns byte indices of matches. In simple scenarios, these locations correspond to the "character p

Regex - Search VSCode files for one string following another (multiline) but where another string doesn't appear between them at the start of a line

In VSCode, I'm looking for all files that contain a return statement followed by the word use but that don't have const [A-Z] at the start of a line in between

grep positive/negative integer value only

I am looking to grep any positive/negative integers only and no decimals, or any other variation including a number. I have a testpart1.txt which has: This is a

Using foreach instead of map and grep in perl

my @a_columns = map { s/^"|"$|\n|\r|\n\r|"//g; $_ } split /;/, $s_act_line; above mentioned is my code. i am getting automatic warning while merging this code

Seems RegEx's 'OR' operator does not work

I have a pattern of regex that should match input that way: Work -> correct {"name": "name"} -> correct (any correct json format object) War And Piece -&g