Patterns I can receive can vary and I have used line1 = "$ABC/xyz" line2 = "123_$ABC_xyz" line3 = "abc_$XYZ_123_def_$ABC" line4 = "$XYZ_def_abc" exp = os.path.e
Trying to get nxxxxx number as the output from below input, uniqueMember: uid=n039833,ou=people,ou=networks,o=test,c=us uniqueMember: uid=N019560, ou=people, ou
Can anyone tell me how to make regex for square brackets ( [ ] ) in JavaScript?
I would like to extract the ISO and ASTM standards from a text. The corresponding literals ISO and ASTM followed by the numbers would have to be found. Rules: M
As a consequence of botched character decoding, I have a set of titles that look like this, with special characters followed by other characters like ñ t
I want to clean up a tag list separated by comma to remove empty tags and extra spaces. I came up with $str='first , second ,, third, ,fourth suffix'; echo pr
I have a text file with multiple lines. Many are blank, or so I am assuming from looking at the file contents. I would like to write/print only the lines that c
I am new to regex and I have been going round and round on this problem. PHP: Check alphabetic characters from any latin-based language? gives the brilliant reg
I am upgrading a Rails 6.1.4 application from Ruby 2.6.10 to Ruby 2.7.6. With Ruby 2.7.6, WebMock no longer matches the Regular Expressions that worked perfect
What I have: 123456789-987654321 What I need: 3456789-4321 (keep last 7 digits from 1st group and keep last 4 digits from 2nd group) (\d{7})- gets me
"abc_d1.txt" should get 0 "abc_d1_2.txt" should get 2 "abc_d1_14.txt" should get 14 "abc_d12_x2_156.txt" should get 156 This is what I've done so far, but I am
Is it possible to back-reference the result of an outer :g command in a recursive call (or an inner :s call?) For instance, let's say I want to search for somet
I have a character like this: x = "abc [File: abcbdosln}} \n abc \n" And I want to remove File: abcbdosln}} \n from x so that the result would be "abc [ abc \n"
The csv file looks like this I'm trying to get the field values like name, it is the value after $$NAME$$ (there is a space after the identifier). How do I st
I'd like to remove any string that ends in either of 2 characters in a pipe. In this example it's ".o" or ".t". Some of them get removed, but not all of them, a
Is there any way to retrieve an array of words prefixed with @ sign in a string? "@City == xyz AND @Hobby == gardening" -> ["@City","@Hobby"] I tried below
I have a grafana query that sums a number of stats, my query looks like alias(summarize(sumSeries(stats.checkout-*.*.*.*.*), '$time', 'sum', false), 'checkout')
I want the extract_pid function to return the uppercase message in parenthesis, after the process id. Following code is printing pids but not sure how to add ca
The contains_acronym function checks the text for the presence of 2 or more characters or digits surrounded by parentheses, with at least the first character in
I'm building a Number Stepper component in React which needs to support integers (both positive and negative) and decimal numbers. I want to only hold the numer