Category "regex"

Regular Expression for parsing ASCII data

Right now I have a couple separate regular expressions to filter data from a string but I'm curious if there's a way to do it all in one go. Sample Data: (DATA$

Regular Expressions- Match Anything

How do I make an expression to match absolutely anything (including whitespaces)? Example: Regex: I bought _____ sheep. Matches: I bought sheep. I bought a sh

Regular expression to match pattern and text afterwards until that pattern occurs again, then repeat

I'm trying to write a regex for my Kotlin/JVM program that satisfies: Given this line of text {#FF00FF}test1{#112233}{placeholder} test2 It should match: Match

GNU Make: expand pattern before passing to Shell

I want to use an awk script to figure out the which modules have to be compiled before I can compile a FORTRAN source file. My project is structured in a way th

Extract complete string containing 'xxx' between two spaces

I want to know if there is a formula to extract a complete string containing 'xxx' between two spaces. For example:

Regular expression not working Sybase ASE 16.0

I am trying to retrieve IDs from a table in Sybase ASE 16.0 The query has to return IDs starting with AB or BC. Example AB0001 AB0002 BC0001 BC0002 The regular

Convert deprecated @include with regular expression to @match in userscript

Tampermonkey has a deprecation warning in for the @include statement for my user scripts: // @include /https\:\/\/([a-z\.]*\.)?(((stackexchange|askubuntu|superu

Regular expression to collect all IPs from Pod definition

I am trying to collect IP addresses of the pods which has 3 network interfaces attached to. From the output of kubectl get pod .. -o yaml, I would like to coll

Using RegEx to extract data from an anchor tag

I have the following anchor tag in an html document that I want to extract the link and the text from: <a href="https://www.catholicgallery.org/bible-drb/act

How to detect letters and theirs upper/lower case format from two characters which need to be compared to each other?

I need to get: If either of the characters is not a letter, return -1 If both characters are the same case, return 1 If both characters are letters, but not the

Convert Json string literals to utf8 characters with perl or bash

I have a file full of \u codes and want to replace them all with corresponding utf8 character, for example "\u00FC" will become "ü": Here is how far I got:

MarkLogic matches function with regular expression

I am new to XQuery so could you please help me to understand what is &#xA7; and &#xA7;.*$ in below MarkLogic XQuery: if (matches($cite, '&#xA7;'))

How to search string in files in all folder names called mydata in windows cmd

Some folders named mydata in a different directory. For example, First mydata folder path is C:\path1\user\mydata The second mydata folder path is C:\somewhere\

How to search string in files in all folder names called mydata in windows cmd

Some folders named mydata in a different directory. For example, First mydata folder path is C:\path1\user\mydata The second mydata folder path is C:\somewhere\

Nested structured search is Sourcegraph?

I would like to search Java annotations with another annotations inside. I don't know how many nested levels there are or I don't want to specify it. Finally, I

Delete ALL Regex Matched Line

this is my file: remark goes here MASS Pd 0.000 0.000 ATTN, need revision ns 14.010 0.530 same as n BOND Pd-cl

REGEX_String between strings in a list

From this list: ['AUSTRALIA\nBELMONT PARK (WA', '\nR3\n1/5/4/2\n2/3/1/5\nEAGLE FARM (QLD'] I would like to reduce it to this list: ['BELMONT PARK', 'EAGLE FARM

Regex: negative lookbehind not directly before target

I am debugging some JavaScript code and I need to identify lines that contain " = " followed by a comparison operator such as "==", ">", "<", "!=". Howev

How to replace all '\n' character after 'word' with 'comma' character

Trying to replace all the \n character after the word 'key2:' pattern with comma. Input String: key1:value1\nkey2:value2\nvalue22\nvalue222 Expected: key1:valu

Sending logs from fluentd to splunk

I am using log4j , so have different formats of logs. I am able to send most of the logs using the below multiline format from fluentd to splunk, but few of the