As the title says... Chat on...

User avatar
By zooto68
#10932 But isn't a " a character?

How come it only takes out the words between the quotes?

That's what I can't get my head around.

I would have thought that (%a+) would get all of the word up to the " but it doesn't work.
Last edited by zooto68 on Fri Feb 27, 2015 6:13 pm, edited 1 time in total.
User avatar
By joe
#10935
zooto68 wrote:But isn't a " a character?

How come it only takes out the words between the quotes?

That's what I can't get my head around.

I would have thought that (%a+) would get all of the word up to the " but it doesn't work.


I pointed you at the description of patterms, where you will find this sentence:

Like `*´, the modifier `-´ also matches zero or more occurrences of characters of the original class. However, instead of matching the longest sequence, it matches the shortest one.
User avatar
By zooto68
#10937 I get that but what I don't get is why it stops at the " (quote) character instead of going all the way to the end of the string? Is that not classed as a character too? What is the definition of a character?

Also why does (%a+) not work?