View Single Post
Old 02-17-2018, 11:06 AM   #19
WS64
WS64 ought to be getting tired of karma fortunes by now.WS64 ought to be getting tired of karma fortunes by now.WS64 ought to be getting tired of karma fortunes by now.WS64 ought to be getting tired of karma fortunes by now.WS64 ought to be getting tired of karma fortunes by now.WS64 ought to be getting tired of karma fortunes by now.WS64 ought to be getting tired of karma fortunes by now.WS64 ought to be getting tired of karma fortunes by now.WS64 ought to be getting tired of karma fortunes by now.WS64 ought to be getting tired of karma fortunes by now.WS64 ought to be getting tired of karma fortunes by now.
 
WS64's Avatar
 
Posts: 661
Karma: 506380
Join Date: Aug 2010
Location: Germany
Device: Kobo Aura / PB Lux 2 / Bookeen Frontlight / Kobo Mini / Nook Color
Quote:
Originally Posted by KevinH View Post
Tried the following on a Mac and it worked exactly as expected:

Code:
The regular expression used:
an:\s[a-zA-Z]*
Code:
The file to search in:

<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
  "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>huh</title>
</head>
<body>
<p>&nbsp;There is an: B C 1 2 3</p>
<p>&nbsp;There is an: 1 2 3</p>
</body>
</html>
It first highlighted the "an: B" and then next highlighted the "an: " since we specified the * which allows 0 occurrences of the [a-zA-z] set.

So regular expressions seem to work just fine on a Mac.

Would someone with access to Windows please try this exact example and let me know if it works correctly or not.
Kevin, and what do you get in your example when you just search for [a-zA-Z]* ?
WS64 is offline   Reply With Quote