After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 638894 - Splitting on \s* gives no result
Splitting on \s* gives no result
Status: RESOLVED NOTGNOME
Product: glib
Classification: Platform
Component: gregex
2.26.x
Other Linux
: Normal normal
: ---
Assigned To: gtkdev
gtkdev
Depends on:
Blocks:
 
 
Reported: 2011-01-07 09:43 UTC by Tim Koopman
Modified: 2011-02-02 14:55 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Very simple C file that shows the bug (353 bytes, text/plain)
2011-01-07 09:43 UTC, Tim Koopman
Details

Description Tim Koopman 2011-01-07 09:43:33 UTC
Created attachment 177730 [details]
Very simple C file that shows the bug

Using g_regex_split_simple on a string with "\s*" as a pattern, I get no results. The manual explicitly says:

[g_regex_split_simple]
For example splitting "ab c" using as a separator "\s*", you will get "a", "b" and "c".

This apparently happens on at least a lot of (all?) Arch Linux installations.

I've attached a simple example application that shows this.

Expected output:

1: 2
2: 3

Actual output:

1: 2
Comment 1 Matthias Clasen 2011-01-07 17:08:06 UTC
Works as expected here. I've now added your test cases to the test suite.
Comment 2 Ionut Biru 2011-01-07 20:47:21 UTC
@Mattias, our glib2 package is compiled with system pcre support. 
currently in repos we have 8.11.

Did your glib 2.26.1 is compiled in this way? I'm just trying to find the bug here with your help. We don't patch or modify in any way glib and is kinda hard for me to pin point the fault
Comment 3 Ionut Biru 2011-02-02 14:55:47 UTC
glib 2.27.93 is not affected by this bug.