tagged [regex]

Regex optional group

Regex optional group I am using this regex: to match strings like this: separating into 4 groups: How do I make the first group optional, so that the resulting group is a empty string? I want to get...

13 Mar at 10:1

RegExp matching string not starting with my

RegExp matching string not starting with my For PMD I'd like to have a rule which warns me of those ugly variables which start with `my`. This means I have to accept all variables which do start with ...

23 Jun at 07:15

Regular expression that doesn't contain certain string

Regular expression that doesn't contain certain string I have something like this > aabbabcaabda for selecting minimal group wrapped by I have this `/a([^a]*)a/` which works just fine But i have probl...

26 Aug at 10:25

How can I write a regex which matches non greedy?

How can I write a regex which matches non greedy? I need help about regular expression matching with non-greedy option. The match pattern is: The text to match is: I test on [http://regexpal.com](http...

18 Jul at 16:8

Regex to match only letters

Regex to match only letters How can I write a regex that matches only letters?

20 Jan at 05:19

How can I exclude one word with grep?

How can I exclude one word with grep? I need something like:

9 Apr at 21:12

Regex to match against something that is not a specific substring

Regex to match against something that is not a specific substring I am looking for a regex that will match a string that starts with one substring and does not end with a certain substring. Example: `...

26 Aug at 10:18

Can I use an OR in regex without capturing what's enclosed?

Can I use an OR in regex without capturing what's enclosed? I'm using [rubular.com](http://rubular.com) to build my regex, and their documentation describes the following: How can I use an OR expressi...

26 Aug at 04:32

How to match "any character" in regular expression?

How to match "any character" in regular expression? The following should be matched: can I do: `".*123"` ?

24 Feb at 15:11

Delete all lines starting with # or ; in Notepad++

Delete all lines starting with # or ; in Notepad++ Using Notepad++, how do I remove all lines starting with # or ;?

18 Apr at 17:16