Re: Hex character ranges
Raman Muthukrishnan <[email protected]> Fri, 25 Aug 2006 10:01:02 -0700 (PDT)
| Newsgroups | gmane.comp.lex.flex.general |
|---|---|
| Message-ID | <[email protected]> |
--===============1092459236==
Content-Type: multipart/alternative; boundary="0-389148896-1156525262=:45373"
Content-Transfer-Encoding: 8bit
--0-389148896-1156525262=:45373
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit
Flex allows only single character ranges. From the flex man page:
[xyz] a "character class"; in this case, the pattern
matches either an 'x', a 'y', or a 'z'
[abj-oZ] a "character class" with a range in it; matches
an 'a', a 'b', any letter from 'j' through 'o',
or a 'Z'
Note the description of 'j' through 'o'.
So you can also give [\x01-\xFF] as a character range; but [\x01\x02-\x0f\xff] will be interpreted as match for \x01, or match for any char in the range \x02 to \x0f or match char \xFF.
[email protected] wrote:
From: [email protected]
Subject: Hex character ranges
To: help-flex
Message-ID:
<[email protected]>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Greetings,
According to the documentation, it is possible to specify a hex
character to match using '\x' such in '\x2a'. I was curious if it was
possible to use hex ranges in such expression, like matching \x20a0 to
\x20cf. If so, can you use some compound logic to make a defintion,
such as
SYMBOL \x092f|\x0e3f|[\x20a0-\x20cf]
If this isn't possible, please suggest possible work arounds.
Thanks for taking the time to read this,
Matt
------------------------------
_______________________________________________
help-flex mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-flex
End of help-flex Digest, Vol 44, Issue 1
****************************************
---------------------------------
Yahoo! Messenger with Voice. Make PC-to-Phone Calls to the US (and 30+ countries) for 2¢/min or less.
--0-389148896-1156525262=:45373
Content-Type: text/html; charset=iso-8859-1
Content-Transfer-Encoding: 8bit
<div>Flex allows only single character ranges. From the flex man page:</div> <div> [xyz] a "character class"; in this case, the pattern<BR> matches either an 'x', a 'y', or a 'z'<BR> [abj-oZ] a "character class" with a range in it; matches<BR> an 'a', a 'b', any letter from 'j' through 'o',<BR> or a 'Z'<BR>Note the descri
ption of 'j' through 'o'.</div> <div>So you can also give [\x01-\xFF] as a character
range; but [\x01\x02-\x0f\xff] will be interpreted as match for \x01, or match for any char in the range \x02 to \x0f or match char \xFF.</div> <div><BR><B><I>[email protected]</I></B> wrote:</div> <BLOCKQUOTE class=replbq style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #1010ff 2px solid">From: [email protected]<BR>Subject: Hex character ranges<BR>To: help-flex <[email protected]><BR>Message-ID:<BR><[email protected]><BR>Content-Type: text/plain; charset=ISO-8859-1; format=flowed<BR><BR>Greetings,<BR><BR>According to the documentation, it is possible to specify a hex<BR>character to match using '\x' such in '\x2a'. I was curious if it was<BR>possible to use hex ranges in such expression, like matching \x20a0 to<BR>\x20cf. If so, can you use some compound logic to make a defintion,<BR>such as<BR>SYMBOL \x092f|\x0e3f|[\x20a0
-\x20cf]<BR><BR>If this isn't possible, please suggest possible work
arounds.<BR><BR>Thanks for taking the time to read this,<BR>Matt<BR><BR><BR><BR><BR>------------------------------<BR><BR>_______________________________________________<BR>help-flex mailing list<BR>[email protected]<BR>http://lists.gnu.org/mailman/listinfo/help-flex<BR><BR><BR>End of help-flex Digest, Vol 44, Issue 1<BR>****************************************<BR></BLOCKQUOTE><BR><p> 
<hr size=1>Yahoo! Messenger with Voice. <a href="http://us.rd.yahoo.com/mail_us/taglines/postman1/*http://us.rd.yahoo.com/evt=39663/*http://voice.yahoo.com">Make PC-to-Phone Calls</a> to the US (and 30+ countries) for 2¢/min or less.
--0-389148896-1156525262=:45373--
--===============1092459236==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
_______________________________________________
help-flex mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-flex
--===============1092459236==--