Category "regex"

How can I use Regex to extract all words that written in the camel case

I tried to extract all consecutive capitalized words in a given string written with no spacing in between. E.g. The University Of Sydney => TheUniversityOfSy

Regex for allowing words which have only first letter as uppercase?

I am trying to make a regex which will validate if all the words have their first letter as upper case. ex like Fruits is allowed but fruits is not allowed. als

Converting regex to lucene in Elasticsearch Query DSL

I am trying to convert this regex to work in Kibana in a query search and can't seem to get it to work ((\+[2-9]|[2-9]){1}\d{10,}$)|((\+[2-9]){1}\d{8,}$)|((\+{0

Regex to search for unique last names in XML

I have last names in an XML file that I would like to capture, which are unique. I am going off this other StackOverflow answer to start: Only match unique stri

Regex for double quotes inside string

A follow up to my previous question here. I realize I need to be more specific regarding my regex case to get an answer that works for my case. I am fighting w

How to ensure that a string contains numbers and letters by using RegEx

I'm trying to match strings that either: Contains between 9 and 15 numbers (Only numbers) Contains between 6 and 15 numbers+letters (it must contain both, numbe

Strip multiline python docstrings with regex

I want to strip all python docstrings out of a file using simple search and replace, and the following (extremely) simplistic regex does the job for one line do

replace text between two strings in a file - python

i have a sh file, i need my python script to find specific strings and replace all the text between them in it: hello_example=( # <- this specific line "bla"

How can I validate an email address using a regular expression?

Over the years I have slowly developed a regular expression that validates most email addresses correctly, assuming they don't use an IP address as the server p

Need regex which accept only 4 alpha numeric words and accept period, hyphen and underscore in between

I am trying to write a regex to accept only 4 words and in between the words accept special characters like period(.), hyphen(-) and underscore(). Also if I use

Wildcard/Regex search for [A-Z without Q] in Microsoft Word

Is there an expression for excluding a single character from a character range in the (arguably somewhat peculiar) Regex syntax of Microsoft Word? These don't s

Python regex remove dots from dot separated letters

I would like to remove the dots within a word, such that a.b.c.d becomes abcd, But under some conditions: There should be at least 2 dots within the word, For e

R: Extract first number despite irregular delimiter from a junk data

I am working on a dataframe df that has thousands of rows of junk data in which the first number is to be extracted despite irregular delimiter: dummy_numbers =

Print REGEX using USER DEFINED FUNCTION

I'm trying to print the variables ccb_3, nome, data, taxa and parcela using the function I defined as "ext_ccb", but when I run the code it returns 3 times (bec

Using regex to get everything in parentheses followed from particular word

I have the following string: text='2-05-13 15:31:48.253 StockSpy Realtime Stocks Quote[5353:207339] Websocket: symbols: ({change = "0.5250015";changePercent = "

Trimming site names

I'm trying to trim any combination of a webname to just web.co. Example 1.htt:pubhorn.co 2.www.pubhorn.co 3.htt://pubhorn.co 4.pubhorn.co/awawa I want to outpu

python replace env params in a string which is not a path

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

Powershell Regex match statement

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

What is regex for square bracket character in javascript [closed]

Can anyone tell me how to make regex for square brackets ( [ ] ) in JavaScript?

How can I extract ISO and ASTM standards from a text using regex?

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