tagged [regex]

Find a string between 2 known values

Find a string between 2 known values I need to be able to extract a string between 2 tags for example: "00002" from "`morenonxmldata0002morenonxmldata`" I am using C# and .NET 3.5.

5 Sep at 16:41

Can i use regex to find the index of X?

Can i use regex to find the index of X? I have a big string, and want to find the first occurrence of X, X is "numberXnumber"... 3X3, or 4X9... How could i do this in C#?

8 Apr at 07:26

Split string on whitespace in Python

Split string on whitespace in Python I'm looking for the Python equivalent of

21 Mar at 23:25

Get Substring between two characters using javascript

Get Substring between two characters using javascript I am trying to extract a string from within a larger string where it get everything inbetween a `:` and a `;` Current Desired Output

8 Oct at 03:16

How to create a regex for accepting only alphanumeric characters?

How to create a regex for accepting only alphanumeric characters? > [Regular Expression for alphanumeric and underscores](https://stackoverflow.com/questions/336210/regular-expression-for-alphanumeri...

23 May at 12:34

Regular expression for specific number of digits

Regular expression for specific number of digits I want to write a regular expression in C# that inputs only a specific number of only numbers. Like writing a regular expression to validate 5 digits n...

8 May at 07:7

How can I validate a string to only allow alphanumeric characters in it?

How can I validate a string to only allow alphanumeric characters in it? How can I validate a string using Regular Expressions to only allow alphanumeric characters in it? (I don't want to allow for a...

29 Nov at 19:10

Regex date format validation on Java

Regex date format validation on Java I'm just wondering if there is a way (maybe with regex) to validate that an input on a Java desktop app is exactly a string formatted as: "YYYY-MM-DD".

2 Aug at 12:1

icd9 regex pattern

icd9 regex pattern I cannot find a definitive guide to icd9 code formats. Can anyone explain the format - especially the use of trailing and leading zeros? A C# regex for icd9 and icd10 codes would al...

8 Apr at 05:35

python .replace() regex

python .replace() regex I am trying to do a grab everything after the `''` tag and delete it, but my code doesn't seem to be doing anything. Does `.replace()` not support regex?

3 Jan at 17:8

Regular expression to match a dot

Regular expression to match a dot Was wondering what the best way is to match `"test.this"` from `"blah blah blah test.this@gmail.com blah blah"` is? Using Python. I've tried `re.split(r"\b\w.\w@")`

9 Oct at 12:32

Matching exact string with JavaScript

Matching exact string with JavaScript How can I test if a RegEx matches a string ?

2 Oct at 13:16

Regex to validate JSON

Regex to validate JSON I am looking for a Regex that allows me to validate json. I am very new to Regex's and i know enough that parsing with Regex is bad but can it be used to validate?

6 Apr at 08:17

How to replace upper case with lower case using regex?

How to replace upper case with lower case using regex? I need to replace upper case letter in variable name with lower case letter and add space For example: `NotImplementedException` should be `Not i...

7 Dec at 16:39

How to replace   to space?

How to replace   to space? Content is How to replace the ` ` in html code and keep the other ` ` in the text.

14 Sep at 12:20

regular expression to match one or two dots

regular expression to match one or two dots What is the regular expression for . and .. ? The matches accepts String which asks for regular expression. Now i need to remove all DOT's inside my MAP.

20 Oct at 07:10

How do I replace multiple spaces with a single space in C#?

How do I replace multiple spaces with a single space in C#? How can I replace multiple spaces in a string with only one space in C#? Example: would be:

24 Sep at 03:19

How can I set Regular Expression on TextBox?

How can I set Regular Expression on TextBox? How can I set a regular expression on [WPF](http://en.wikipedia.org/wiki/Windows_Presentation_Foundation) TextBox? I want the textbox to accept input in so...

26 Aug at 17:4

Remove punctuation from string with Regex

Remove punctuation from string with Regex I'm really bad with Regex but I want to remove all these .,;:'"$#@!?/*&^-+ out of a string How can I do that ?

3 May at 15:22

How to type ":" ("colon") in regexp?

How to type ":" ("colon") in regexp? `:` ("colon") has a special meaning in regexp, but I need to use it as is, like `[A-Za-z0-9.,-:]*`. I have tried to escape it, but this does not work `[A-Za-z0-9.,...

12 Nov at 22:16

Regular Expressions- Match Anything

Regular Expressions- Match Anything How do I make an expression to match absolutely anything (including whitespaces)? Example: I bought _____ sheep. I bought sheep. I bought a sheep. I bought five sh...

26 Jun at 02:56

Regex doesn't work in String.matches()

Regex doesn't work in String.matches() I have this small piece of code Supposed to print but it prints nothing!!

13 Feb at 18:34

How do I check whether input string contains any spaces?

How do I check whether input string contains any spaces? I have a input dialog that asks for XML element name, and I want to check it to see if it has any spaces. can I do something like name.matches(...

15 Jul at 00:34

Detect if string contains any spaces

Detect if string contains any spaces How do I detect if a string has any whitespace characters? The below only detects actual space characters. I need to check for any kind of whitespace.

25 Oct at 16:54

C# hexadecimal value 0x12, is an invalid character

C# hexadecimal value 0x12, is an invalid character I am loading a lot of xml documents and some of them return errors like "hexadecimal value 0x12, is an invalid character" and there are different cha...

10 Jan at 19:46