According to http://gambaswiki.org/wiki/doc/pcre , using "*?" in a regular expression should lazily match 0 or more characters. However, it appears to act greedily.

I am trying to do some very simple HTML tag stripping with 'Regex.Replace(sText, "<.*?>", "")', and it takes out way more than just the tags.

Have I misunderstood the documentation?

(Project attached.)

--
Lee

[System]
Gambas=3.9.2
OperatingSystem=Linux
Kernel=4.4.57-18.3-default
Architecture=x86_64
Distribution=SuSE NAME="openSUSE Leap"
VERSION="42.2"
ID=opensuse
ID_LIKE="suse"
VERSION_ID="42.2"
PRETTY_NAME="openSUSE Leap 42.2"
ANSI_COLOR="0;32"
CPE_NAME="cpe:/o:opensuse:leap:42.2"
BUG_REPORT_URL="https://bugs.opensuse.org";
HOME_URL="https://www.opensuse.org/";
Desktop=KDE5
Theme=QtCurve
Language=en_US.UTF-8
Memory=3951M

[Libraries]
DBus=libdbus-1.so.3.8.14
OpenGL=libGL.so.1.2.0

[Environment]
(redacted)

Attachment: lazyregextest-0.0.1.tar.gz
Description: application/gzip

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user

Reply via email to