I know the regex that separates two words as following: input: 'WonderWorld' output: 'Wonder World' "WonderWorld".replace(/([A-Z])/g, ' $1'); Now I am l
In my code, I use four four regex conditions but it is too long, so is there simple or general method can combine these conditions? I tried to r'[(abc|def)+^((?
I'm currently working on a big svg sprite. The diffrent images are always 2000px apart. What I have is: <g transform="translate(0,0)"> <g transform="
I have data in Excel like follows (one row here - one cell in Excel): 07 July 2015 12:02 – 14 July 2015 17:02 12 August 2015 22:02 – 01 September 2
Regex::replace_all has the signature fn (text: &str) -> Cow<str>. How would two calls to this be written, f(g(x)), giving the same signature? Here'
I want my domain name to not contain more than one consecutive (.), '/' or any other special characters. But it can contain IDN Characters such as Á,
I am trying to find out if certain patterns appear within a data frame. Suppose I have the following "dictionary of patterns" (notice "james" vs "jamesj"): patt
I have a map (key, value pairs) and few of these values have line breaks within them (inside double quotes) which is causing issues in CSS. How can I remove the
I have to run this query in Java db.Users.find({"name": /^ind/i}) My Java code is Document findQuery = new Document(); findQuery.append("name", Pattern.co
I used this regex: ^[aeiou](\w|\s)*[aeiou]$ for words starting and ending with vowels and it works fine. But when I use this regex: ^[^aeiou](\w|\s)*[^aeiou]$
I have a string: var str = "Lorem ipsum dolor sit amet, consectetur adipiscing elit"; Is there a way to find the longest word in a string using regex? This w
I am trying to extract text from a string, and have trouble with laziness/greediness. In the example I want the piece of text to match <b>I want this pie
I am trying to retrieve the product models from a list of product titles. Since it is difficult to retrieve model from title, I decided starting from getting s
I recently added ripgrep to my list of vim plugins and, immediately after installation, I began receiving this error message whenever I loaded up vim: Error det
I need to write a strict regular expression to replace certain values in my pandas dataframe. This is an issue that was raised after solving the question that I
I was looking for a regex to match words with hyphens and/or apostrophes. So far, I have: (\w+([-'])(\w+)?[']?(\w+)) and that works most of the time, though
I need to highlight a certain characters from a string, I tried str_replace and preg_replace. But these work only if full word is entered, $text = str_replace(
In Cypress, .contains command yields all matching elements, so for clicking in a dropdown item with a text on it, .contains works fine. But I'm facing the probl
I am trying to get 2 functions to validate an SSID and WPA2 passcode. function isValidSSID(ssid) { return (regex) } and function isValidWPA(passcode)
Context In my daily job I lost a lot of time putting values in excel from a balance sheet manually, so I start learning how to code in python to speed up my wor