Skip to main content

All Questions

Tagged with
1 vote
1 answer
52 views

Extracting code using RegEx and Python from a JavaScript function

I'm currently parsing some Gherkin files along with their associated step definition files. I'm wondering what the best way would be to extract the RegEx inside the step along with the code would be. ...
Uncle Ben's user avatar
-1 votes
3 answers
76 views

Replacing line breaks within quotes [closed]

I have a TSV file that contain multiple columns, but it doesn't seem to be aligned properly. There are linebreaks between quotes in one column (the column "Examples" in the example). I want ...
aoooooiiiiiiiiiiiiiii's user avatar
-1 votes
1 answer
48 views

How to extract only EXEC queries from SQL procedures?

I am trying to extract only EXEC queries from SQL procedures like the one shown below: USE [test] ALTER PROC [dbo].[USP_TEST] @idx int AS EXEC USP_TEST_BY_IDX @idx print("TEST") EXEC ...
buzzy's user avatar
  • 15
0 votes
1 answer
79 views

$ regex replace equivalent in python

I'm writing a python program that uses re.sub re.sub("( |\t)([a-zA-Z0-9_]+) = ", "$1\"$2\":", string) the only issue is that when I use this code instead of actually ...
Jeffrey Winekenburg's user avatar
1 vote
1 answer
141 views

how to use docker image tag parsing regex in javascript?

I copied this regex for parsing docker image tag in Python. ^(?P<repository>[\w.\-_]+((?::\d+|)(?=/[a-z0-9._-]+/[a-z0-9._-]+))|)(?:/|)(?P<image>[a-z0-9.\-_]+(?:/[a-z0-9.\-_]+|))(:(?P<...
Mohammad Javdani's user avatar
0 votes
1 answer
56 views

reversed regex mashine implementation

I'm trying to match a string starting from the last character to fail as soon as possible. This way I can fail a match with a custom string cstr (see specification below) with least amount of ...
Linda Tabatha Forester's user avatar
0 votes
1 answer
51 views

regex for repeating word to repeating two words

I am trying to write some regex pattern that will look through a sentence and remove any one or two sequentially repeated words for example: # R code below string_a = "hello hello, how are you ...
zimia's user avatar
  • 932
-1 votes
1 answer
48 views

matching regex for custom params in URI

I am building a web framework and REGEX is really hostile today. I do not like the django way of formatting custom params with angle brackets url/<param>/... or <str:token>/ I would ...
Alex D'ago's user avatar
-4 votes
1 answer
62 views

How can I get all the string between two characters using regex?

I have a text with this structure SourceName1: {desiredString1} SourceName2: {desiredString2} ... ... ... SourceNameJ: {desiredStringJ} I would like to get whatever is between "{" and &...
OLoboDaEstepe's user avatar
1 vote
2 answers
457 views

What regular expression would match words for which the first and last letter are different?

I know how to match a string having the same first and last character using: /^(.).*\1$/ I want the opposite requirement for words: a regex to match words where the first and last letter are ...
vishwasai Karnati's user avatar
0 votes
1 answer
88 views

Is there a way that i can translate Python regular expression to JavaScript regular expression

I have been having trouble trying to translate python regular expression to a JavaScript regular expression here is the python code r/^([ab].*\1$ | ^[ab]$/ and this was my JavaScript translation /([^...
Gideon Adams's user avatar
-1 votes
2 answers
97 views

Lookahead and Lookbehind validation for each letters in a string (Regular Expression XYX or XXX matching) [closed]

I need to find the letters which have the same letter before and after. Using regular expression how do that? Example: Input ➵ Output oooh my god ...
Art Bindu's user avatar
  • 1,392
0 votes
2 answers
325 views

Regex finding entire line from paragraph

I need to find the actual line from the paragraph, and the paragraph drawing by the markdown editor you can add a checkbox, radio, textbox, and paragraph through the editor. The actual str is ...
Selva Ganapathi's user avatar
0 votes
0 answers
198 views

Using A Different Regex Engine in Python

Python uses the "Python" regex engine re; this implementation is very slow. I want to try and use the ECMAScript implementation of regex in my python code... is there a way to do this? ...
Trevor Hurst's user avatar
3 votes
3 answers
2k views

Regex must be in length range and contain letters and numbers

I want to write a regex that will find substrings of length 10-15 where all characters are [A-Z0-9] and it must contain at least 1 letter and one number (spaces are ok but not other special characters)...
Toby S's user avatar
  • 129

15 30 50 per page
1
2 3 4 5
14