Category "regex"

assertj recursive comparison ignoring regex failing after upgrade from 3.18.1 to 3.21.0

I have updated my springboot , along with that my assertj also seems to have upgraded. Now the test which was initially working in the older version is failing.

RegEx for email with only one special character

I am trying to modify a regex for emails (gmail) that should contains special characters like _%+-. but only one, not more I made 2 test cases below that are bo

How do I use regex to remove substring before a pipe in pandas dataframe?

In cna pandas dataframe, for all values of Hugo_symbol column, if there is a pipe (|) followed by "ENSG*", remove everything before the pipe. My code: import re

Delete a word from a string which contains hashtags

I have already done a lot of "filtering" with regexp to remove unwanted characters from a string, this is what i am using: var regexpHashtag = new RegExp(/(?:^|

How can I add an epsilon move to FSM using Python?

I am using the greenery module to implement an FSM: from greenery import fsm, lego E, O = range(2) z, o = '0', '1' # Create the FSM machine = fsm.fsm( al

Difficulty in create regex [duplicate]

40 I'm having trouble checking in React Js if a value is is any of the following combinations no spaces in starting Ramaining accept anything(

@typescript-eslint/naming-convention ignore object inside a classname

tl:dr, why is this REGEX incorrect : classNames.*(.*{(?:.|\n)*?}) although it work in regex101 ? I am using typescript with eslint. I setup some naming conventi

Does Node.js support the String.MatchAll method?

When I test the code: let result = 'heymama'.matchAll(/m(a)/g); I get the error "'heymama'.matchAll is not a function" When I run the version: let result =

How to get part of string from regex in Java

For example, I have string with range of earnings: 5 000-10 000 USD and i want to extract from that string minimum and maximum value. I prepared regexes, for e

How do i write a RegEx that starts reading from behind?

I have a series of words I try to capture. I have the following problem: The string ends with a fixed set of words It is not clearly defined how many words the

How do I change the values in a pandas column that are selected by a regex?

I'm cleaning up data for a personal project and am standardizing the large number of categories. The seemingly low hanging fruit have similar enough names such

Find a string and replace it with another string with regex?

I have a text file with below format: Available Text1 Id = 0005 Cause = ERROR Code = 307 Event Time

Safe regex patterns from ReDos attack

I've recently faced with some redos attack issues. Explain in simple steps: Regex denial of services: it means the attacker can put some malicious/crafted input

How to convert camel case to snake case with two capitals next to each other

I am trying to convert camel case to snake case. Like this: "LiveKarma" -> "live_karma" "youGO" -> "you_g_o" I cannot seem to get the second example worki

Average test score from result array with varying group sizes

I am working on a problem where I have to calculate the average from a bunch of test results with the following criteria. -his program was tested on several tes

Regex splitting on newline outside of quotes

I want to split a stream of data on new lines that are NOT within double quotes. The stream contains rows of data, where each row is separated by a newline. How

SUMIFS with OR criteria in Google Sheets

I want to add values in Column C with the conditions that Column B = 0, AND Column A = "a" OR "b" From what I've searched, this would work, but only in excel:

How to validate for length of an integer in Json Schema?

Simulator: https://www.jsonschemavalidator.net/s/L3FmJnoE It looks like json schema validation does not check for regex patterns for integers. How to validate f

Regex remove the hyperlink from a column in pandas data frame (imported from csv)

I read data from csv data_frame2 = pd.read_csv("search query.csv") print(data_frame2['id'][0]') is HYPERLINK("https://something.com/resource/1308610617","130861

Regex expression to capture only numeric fields and strip $ and comma, no match if there are any alphanumeric

I'm trying to write a regex that will strip out $ and , from a value and not match at all if there are any other non-numerics. $100 -> 100 $12,203.00 -> 1