I have a regexp:  /(alpha)|(beta)|(gamma)/gi   Some text to match against:  Betamax. Digamma. Alphabet. Hebetation.   The matches are:  beta, gamma, alpha, beta   The values I am looking would be:  1,2,0,1   ...can I ascertain the index of the group...
if a string has this predicted format:  value = "hello and good morning"   Where the " (quotations) might also be ' (single quote), and the closing char (' or ") will be the same as the opening one. I want to match the string...
I'm fairly sure after spending the night trying to find an answer that this isn't possible, and I've developed a work around - but, if someone knows of a better method, I would love to hear it...  I've gone through a lot of iterations...
There is regex feature to find words instead of "Ctrl + F" in some editor like VS Code, I'm trying to find a word after a specific word with some another lines.   For example, how to use regex to filter those "someFunction" with t...
Let's pretend we have the following import statements (not language-specific):  import "./test"  import "./test" as Test  import { Test } from "./test"  import { Person as Individual } from "./test"   I'm tryin...
I have a paragraph like below:  Some wording for testing [!#today] where the [!condition] does not satisfy with this verbiage [!ShowElemIf://Student/FullName;  [[[Text not recognized fully]]]  ;/First Name] But simple tags found having age [!ShowElem...
I have this user price input that I want to allow 0, 1 or 2 decimal digits.    I'm using comma for decimals. I'm not using nor allowing thousand separators.   QUESTION:  I want to replace the input if the user enters a third decimal digit.  S...
I am trying to split string in 3 different parts with regex.  I can only get function parameters from string but i also want to other parts of the string  const regex = /(\(.*?\))+/g; const sampleString = 'collection.products(take:12|skip:16)'...
I want to split string  'something.somethingMore.evenMore[123].last'   to  ['something', 'something.somethingMore', 'something.somethingMore.evenMore[123]', 'something.somethingMore.evenMore[123].last']   I can...
I have a string that contains single, double, and escaped quotations:     Telling myself 'you are  \'great\' ' and then saying "thank you" feels "a \"little\" nice"   I would like a single regex to pull out:...

Tags

Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us

©2020 All rights reserved.