Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange
Join us in building a kind, collaborative learning community via our updated Code of Conduct.

Questions tagged [regex]

Also known as regular expression or regexp, a description of a set of strings, often used for searching and validating strings.

2
votes
1answer
17 views

How do you ignore all files but not subdirectories with Unison?

I want to sync the content of all subdirectories of a given root but only a few files in the root itself. To do so I would like to ignore all files using the ignore directive (keeping all ...
0
votes
0answers
18 views

Python regex match for special characters (solved) [on hold]

I am trying to replace a string containing [, ] and either ' or " via regex under python but I can't seem to get the escaping characters working. The only way I managed to properly escape was by using:...
0
votes
1answer
15 views

Case converter from xxx xxx form to XXX Xxxx

I want to know if exist a program or a regex or some trick to convert from Jackson Michael jordan michael jordan Michael .. into this form JACKSON Michael JORDAN Michael ..
0
votes
1answer
31 views

Regex Query to find mis-branded hyperlinks

I am trying to run a regex command to parse through incoming emails to identify any hyperlinks that have been sent by phony/phishing sites attempting to use a variation of our company name. Our ...
0
votes
1answer
30 views

Regular expression to match opening double quote missing a ending double quote

I have a large (25 million rows) data file that is pipe (|) delimited. The data vendor provides files and I run automated jobs to load the files to a Redshift database and then process the data. The ...
3
votes
1answer
20 views

Notepad++: Find a Method in a source code and delete it except of the argument

I have several thousend files of code. For the future I need to get rid of a method but I want do keep the argument in the same line. I would like to solve the problem with regex in Nodepad++ The ...
0
votes
1answer
26 views

grep regex pattern matches on each line where only all matches appear and print on same line

trying to extract some patterns per line, from a log file. I am trying to extract the first time stamp, and two or three other matches but I want to be able to only print the matches from the lines ...
1
vote
1answer
83 views

Grep regex result not as expected?

Using FreeBSD 11.1: #!/bin/sh if printf 'abcde.fgh' | grep -iEq '^[^][$^*_-]'; then echo "test 1 success" else echo "test 1 fail" fi echo if printf 'abcde.fgh' | grep -iEq '^[^][.$^*_-]'; ...
2
votes
2answers
47 views

Extract and display only year from each lines on Notepad++ using regex

I have strings like that hack SIGN (2005) g$ 5 Cm Per Second - Makoto Shinkai Collection (2007) Abenobashi (2002) gd Ai City - La Notte Dei Cloni (1986) dfg AIKA (1997) Anna Dai Capelli Rossi (1979) £...
0
votes
1answer
30 views

Extract files matching pattern from RAR archive

I have an RAR archive, and I want to extract all files with a three-digit number as an extension. I tried with Winrar but it does not accept REGular EXpression: winrar.exe e -y pinetinf pinet.[0-9*] ....
0
votes
0answers
44 views

Apache Reverse Proxy, Trouble with Regex

I am trying to install a service for my friends, but I'm a little bit stuck. The documentation gives the following to access my https://localhost:9000/ install via https://domain.tld/irc/ ...
0
votes
2answers
37 views

Don't match whitespace at the end of line

When I use regular expression to replace white spaces, \s is also matching the end of a line and not just the space in a line. How do I rectify this to just replace the whitespaces in a line.
0
votes
0answers
24 views

Regex matching in shell script

Here is a snippet from my shell script - regex="<version>([0-9]*)\.([0-9]*)\.([0-9]*)([^<]*)<\/version>.*" #some unrelated lines of code echo $(grep -m 1 "<version>" $1) ...
0
votes
1answer
27 views

How to output a particular word in file, if it is present?

I am making a simple script where i turn true to false if true is present in file or vice versa if false is present in file, details here. Now i want to output, what is the value after change ie if i ...
0
votes
1answer
27 views

Can Regular Expressions be used in URLs while browsing?

I am aware of Google Dorks that use advanced operators to search for keywords on Web, and Google Dorks is not Regex by anyhow. Out of curiosity I tried putting wildcard characters in URLs mostly for ...

15 30 50 per page