Bug 1202 : match regex working as expected?
Last modified: 2010-06-05 03:12




Status:
ASSIGNED
Resolution:
-
Priority:
P2
Severity:
normal

 

Reporter:
jedierikb
Assigned To:
REAS

Attachment Type Created Size Actions

Description:   Opened: 2009-03-13 04:49
1.0.3

Perhaps this is a bug in documentation. Or (very likely) I am not too hot with the
regexs. However...

On the "match" function page, the following example is given:

void setup()
{
String s = "Inside a tag, you will find content.";
String[] m = match(s, "(\\S+)");
println("Found " + m[1] + " inside the tag.");
// Prints "Found content inside the tag." to the console
}

However, this prints "Found Inside inside the tag." to the console.
Additional Comment #1 From fry 2009-03-13 09:05
Nope, that's a bug in the documentation. That doc has had multiple edits so
I think something got lost... I think there are supposed to be actual HTML
tags in there which is probably what's causing trouble. Thanks for the find.
This bug is now being tracked here.