Skip to main content

Questions tagged [pcre]

Perl compatible regular expressions syntax and library

3 votes
2 answers
214 views

I'm stuck with this error without clue or reference how to solve it: I have this list on text.txt Angie Apple Angie Banana Angie Tomato Angie Peach Angie Onion I'm running substitution through ssed (...
Zerchro's user avatar
  • 31
4 votes
0 answers
6k views

I have the following journal messages: $ journalctl _COMM=kwin_wayland -o cat --since "-10s" ... kwin_screencast: Dropping a screencast frame because the compositor is slow kwin_screencast: ...
Ashark's user avatar
  • 1,229
1 vote
2 answers
188 views

I am trying to use lookaround element in PCRE2 regex for Wazuh tool, i need to match strings which are in double quotes and made the below regex however it looks its picking up "<" ...
Atul's user avatar
  • 1,911
0 votes
1 answer
322 views

I have many patterns with bracket enclosure, I made a regular expression where is not considering brackets and just only what is inside/between them, but exists a problem when the text within brackets ...
dcubaz's user avatar
  • 23
1 vote
4 answers
785 views

The input file exists out of lines containing multiple 10-letter combinations: NGNAEAREAX EAHVSELYCI FNWGNLACQM AWKLRMDHIT PRYMFNYMVM NCNREDEEEQ EAHVSELYCI FNWGNLACQM AWKLRMDHIT PRYMFNYMVM I need a ...
Tomyy's user avatar
  • 155
3 votes
2 answers
1k views

Rookie question. Following this answer Move last part of filename to front, I'm trying to do the same, except all files in my case contains square brackets. What I want is to move the title to the ...
Nicolas Ø's user avatar
3 votes
3 answers
1k views

I have a TOML file in the following format (categories may have any name, the sequential numbering is just an example and not guaranteed): [CATEGORY_1] A=1 B=2 [CATEGORY_2] C=3 D=4 E=5 ... [...
Educorreia's user avatar
3 votes
5 answers
17k views

Let's say I have a file like following 1,2,3-5,6 1,2,3-5,6, 1 1-3 1,2,3-,4,5-7 1,2,3-,4,5-7, 1,2,-3,4,5 1,2,-,3,4 1,2,,,3,4 ,1,2,3 Only combination of following rules should be considered as valid: ...
GypsyCosmonaut's user avatar
9 votes
1 answer
7k views

Using jq, I want to search for a pattern via regex, and wrap the matched string with something like <div> tags $ echo "\"This is a valid json file"\" | jq '. | gsub("...
Zeta.Investigator's user avatar
7 votes
5 answers
18k views

I am trying to do a build and local install of R 4.0.4 on Red Hat Linux 6.8. There were several unmet dependencies which I resolved by doing local installations (following the procedure in this). ...
Dronacharya's user avatar
0 votes
1 answer
56 views

I want to grep nonascii characters from a lot of .gz files. However the below does not work on CentOS 7.6 (GNU grep v2.20) $ zcat yyyy/yyyymmdd/filname.yyyymmdd.gz | grep --color='auto' -P -n "[\...
fivelements's user avatar
2 votes
1 answer
256 views

I would like to use a perl compatible regex engine in the less command line utility. Is that possible?
drevicko's user avatar
  • 353
1 vote
2 answers
693 views

Is anyone here can explain a case where the recursive Perl/PCRE regex (?R) can be helpful ? I read https://regular-expressions.mobi/recursebacktrack.html?wlr=1 https://perldoc.perl.org/perlre.html#(%...
Mévatlavé Kraspek's user avatar
3 votes
4 answers
9k views

I am new to GNU/Linux and regex. Recently I've been playing around trying to get to grips with regex. So far I feel I've got a pretty solid foundational understanding. I'm digging PCRE at the moment. ...
customcup's user avatar
  • 131
0 votes
1 answer
348 views

I have downloaded pcre from https://ftp.pcre.org/pub/pcre/pcre2-10.34.tar.gz and extracted it to /usr/local/lib when I run ./configure --with-included-apr --with-pcre=/usr/local/lib/pcre2-10.34 I ...
Daniel's user avatar
  • 121

15 30 50 per page