Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > regex reserved chars

Reply
Thread Tools

regex reserved chars

 
 
Lew
Guest
Posts: n/a
 
      02-09-2013
Arne Vajh°j wrote:
> Roedy Green wrote:
>> Lew wrote, quoted or indirectly quoted someone who said :
>>> http://lmgtfy.com/?q=Regular+express...haracter+class

>
>> Did you check to see if the question is actually answered in there
>> somewhere, or just that in any sane universe it should be?


I always confirm and follow all links that I post before I press SEND.
In addition I follow the search links, ensuring that the top three or
four contain information pertinent to the question. Often I will spend
some time reading the articles to which the search linked. I learn a
lot doing that.

> You asked the question.
>
> So what about you check!!!!
>
> The first link I get has the info.


By offering a search link I'm able to provide much, much more information
to the querent than anything I could condense myself into a post.

Some people get mad, saying, "If I could have come up with those search
terms I wouldn't have asked!"

Exactly. But rather trivial, as that could be said about every question
that comes up here. But you took an important first step, seeking help
for your problem.

My skill at providing search terms that will help you find your answers
is my gift to you. You are most welcome.

--
Lew
 
Reply With Quote
 
 
 
 
Nigel Wade
Guest
Posts: n/a
 
      02-11-2013
On 09/02/13 03:02, markspace wrote:
> On 2/8/2013 5:06 PM, Arne Vajh├Şj wrote:
>
>> On 2/7/2013 4:17 PM, Martin Gregorie wrote:
>>> That's normally the first place I look, but it doesn't answer Roedy's
>>> question -

>
>>
>> Actually it does explain that the special characters are different
>> inside and outside.
>>

> ...
>> It did not answer the next question: what is the special
>> characters inside.

>
> I had to double-check this myself, but it does indeed answer the question. The section on character classes lists all
> the special character classes; they even order them by precedence for you.
>
> They are:
>
> 1. Literal escape: \
> 2. Grouping: []
> 3. Range: - (as in a-z)
> 4. Union (implicit): [a-e][i-o]
> 5. Intersection: &&
>
> That's it.


Er, not quite. There's also '^' which, as the first character only, negates the match.

Under the section "Character classes":

[^abc] Any character except a, b, or c (negation)

--
Nigel Wade


 
Reply With Quote
 
 
 
 
markspace
Guest
Posts: n/a
 
      02-11-2013
On 2/11/2013 1:25 AM, Nigel Wade wrote:

> Er, not quite. There's also '^' which, as the first character only,
> negates the match.


Did you read the next paragraph where I mention this?

I wrote:
> (It appears to me that
> ^ actually makes a separate token with [, [^, which is different from
> the non-negated character class. That's why you can use ^ anywhere
> within the character class except the first position.)


 
Reply With Quote
 
Nigel Wade
Guest
Posts: n/a
 
      02-11-2013
On 11/02/13 15:16, markspace wrote:
> On 2/11/2013 1:25 AM, Nigel Wade wrote:
>
>> Er, not quite. There's also '^' which, as the first character only,
>> negates the match.

>
> Did you read the next paragraph where I mention this?
>


Ah, not entirely.

My mistake.

--
Nigel Wade


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to truncate char string fromt beginning and replace chars instring by other chars in C or C++? Hongyu C++ 9 08-08-2008 12:18 PM
Are Python's reserved words reserved in places they dont need to be? metaperl Python 32 09-15-2006 02:02 PM
RE: Are Python's reserved words reserved in places they dont needtobe? Delaney, Timothy (Tim) Python 10 09-14-2006 04:17 PM
Re: Are Python's reserved words reserved in places they dont needtobe? Steve Holden Python 0 09-13-2006 08:44 AM
Floats to chars and chars to floats Kosio C Programming 44 09-23-2005 09:49 AM



Advertisments