Regular expressions provide a declarative language to match patterns within strings. They are commonly used for string validation, parsing, and transformation. Since regular expressions are not fully standardized, all questions with this tag should also include a tag specifying the applicable ...

learn more…| top users | synonyms (9)

-1
votes
0answers
18 views

Python Split on Literal Escape Character Text

I'm trying to split a string on an escape character. This api I'm dealing with simple returns a text value with "\n" and "\t" literally in the response (there is no actual tab character). I'm trying ...
2
votes
2answers
11 views

How to use sed to find lines with a specific string and output to new file

I am learning sed, so please bear with me. I am trying to use sed to find all files containing "install" in a log and output to a new file. Here's an example of the file being searched:2016-05-04 07:...
0
votes
0answers
12 views

With Regex How Can I Replace All Characters and Then Add Something to The Beginning of Whatever It Is And Keep The Word [duplicate]

I was wondering how I would go about doing the following with regular expressions:str.replace(/[Fizz]|[Buzz]/g,"The "+MagicalRegularExpression);and if it replaces fizz have it come out like:"The ...
-3
votes
1answer
14 views

C# - Regular expression [duplicate]

I'm studying a program written in c #.I do not understand this regular expression, can you explain to me what it does?Thank youMatch numberMatch=Regex.Match(patternOutput, "(#+)([\\.|,])(#+)");
-2
votes
0answers
17 views

How to find a pattern #mm/dd/yyyy hh:mm:ss# in string and replace # with single quote using vb.net?

I would like a vb.net function to replace the # sign with single quote in a string that may contain the pattern #mm/dd/yyyy hh:mm:ss# or #mm/dd/yyyy# or both.For example, for a string:"Something ...
1
vote
1answer
19 views

How to iterate over all matched groups?

If you look at this pythex example, you can see that the expression would get me the actual text of a WIKI_LINK: [WIKI_LINK: Whatever@Example]However, I don't know how I get the result using ...
1
vote
2answers
20 views

Matching strings between two characters [duplicate]

I answered a question the other day about finding the strings that occur between two specified characters. I ended up with this fairly basic regular expression:>>> import re>>> ...
0
votes
1answer
22 views

regex to find numbers with slash [duplicate]

I have some numbers within sentences and they look like thiss='rare blond Canadian terrier on wheels. Only $8.98. test test. ...0.1/10 very rare'patt='[0-9\.{1}]*/10're.findall(patt,s)i want to ...
0
votes
0answers
19 views

Add tabs for the rest part of encrypted text [duplicate]

I have the next Python code which encrypts text:import gnupgimport regpg=gnupg.GPG(gnupghome='/home/user/.gnupg', gpgbinary='/usr/bin/gpg')gpg.encoding='utf-8'with open("/tmp/test1") as ...
0
votes
2answers
32 views

extract the domain name using regex in javascript

I have a list of domain names, e.g. developer.mozilla.org. I need to extract the domain name only, e.g. mozilla.org. I used RegExp but did not get it right so far. Not sure what am I missing.I wrote ...
-1
votes
2answers
17 views

regular expressions, text wrangler, inserting line breaks in certain places

I have a large file. Most lines are like this (record number dot space last name, first name)1. Moore, Roger2. Connery, Sean3. ....100. Dalton, Timothy..Occasionally some unpleasant lines ...
-1
votes
0answers
19 views

Extract filename and id from its name [on hold]

I have a file with text# co2a0000123.rd# co2c0000124.rdI need to use regex and extract co2a0000123 in group 1 and a or c as highlighted in group 2 of regex expression I have tried (\B[a|c])([a-...
3
votes
1answer
33 views

php preg_replace_callback blockquote regex

I am trying to create a REGEX that willInput> quotethe rest of it> another paragraphthe rest of itAnd OUTPUTquotethe rest of itanother paragraphthe rest of itwith a resulting ...
0
votes
1answer
19 views

How to remove specific data in Google Docs

I can't wrap my head around regular expression. Please provide a copypaste solution.TaskI have a text document that used to be subtitles. It contains timestamps and a lot of linebreaks. I want to ...
0
votes
0answers
28 views

regex for splitting a string based on everything except certain characters

I want to split a string based on all aphabets and other spl characters except digits ,/ ,\ ,( ,) and comma.i tried this regex . s.split( /^[\d\,\\\/\+\(\)]/)sample string: hi my% num is +91 67 (...

153050per page
angop.ao, elkhabar.com, noa.al, afghanpaper.com, bbc.com, time.com, cdc.gov, nih.gov, xnxx.com, github.com,