1. wildcard_match; Return position
- Posted by ZNorQ <znorq at holhau??com> Mar 11, 2008
- 651 views
Hey, Do anyone know of a wildcard_match version that returns the position id for the first occurance of the search? The one that is included in the standard euphoria archives do only return true or false, or rather one and zero. Regards, Kenneth 'ZNorQ' Nilsson
2. Re: wildcard_match; Return position
- Posted by Matt Lewis <matthewwalkerlewis at gmail.?om> Mar 11, 2008
- 663 views
ZNorQ wrote: > > Hey, > > Do anyone know of a wildcard_match version that returns the position id for > the first occurance of the search? > > The one that is included in the standard euphoria archives do only return true > or false, or rather one and zero. It's a bit heavy handed if you're not already using it, but wxEuphoria has regular expression support now. Matt
3. Re: wildcard_match; Return position
- Posted by CChris <christian.cuvier at ?gricultur?.gouv.fr> Mar 11, 2008
- 649 views
ZNorQ wrote: > > Hey, > > Do anyone know of a wildcard_match version that returns the position id for > the first occurance of the search? > > The one that is included in the standard euphoria archives do only return true > or false, or rather one and zero. > > Regards, > Kenneth 'ZNorQ' Nilsson You can try EuRegExp in the archive, it will give you this sort of info and more. It's an Euphoria-oriented regular expression library, mostly compatible with Perl's conventions. CChris
4. Re: wildcard_match; Return position
- Posted by ZNorQ <znorq at holh?ug?com> Mar 12, 2008
- 624 views
Matt Lewis wrote: > > ZNorQ wrote: > > > > Hey, > > > > Do anyone know of a wildcard_match version that returns the position id for > > the first occurance of the search? > > > > The one that is included in the standard euphoria archives do only return > > true > > or false, or rather one and zero. > > It's a bit heavy handed if you're not already using it, but wxEuphoria > has regular expression support now. > > Matt Hey Matt, Ok, I'll have a look into that. I'm not quite fluid in reg.exp. use, and I quite urgenty need the updated version of wildcard_match, but seeing that I have no choice, I better get up to speed asap! :) Thanks, Matt.
5. Re: wildcard_match; Return position
- Posted by ZNorQ <znorq at ?o?haug.com> Mar 12, 2008
- 619 views
CChris wrote: > > ZNorQ wrote: > > > > Hey, > > > > Do anyone know of a wildcard_match version that returns the position id for > > the first occurance of the search? > > > > The one that is included in the standard euphoria archives do only return > > true > > or false, or rather one and zero. > > > > Regards, > > Kenneth 'ZNorQ' Nilsson > > You can try EuRegExp in the archive, it will give you this sort of info and > more. It's an Euphoria-oriented regular expression library, mostly compatible > with Perl's conventions. > > CChris Ok, I'll check this out. As I told Matt, I'm not quite the wizz-kid in reg.exp., but this'll be as good as any time to learn it. Thanks to you both. Kenneth / ZNorQ
6. Re: wildcard_match; Return position
- Posted by ZNorQ <znorq at ?olh?ug.com> Mar 12, 2008
- 618 views
CChris wrote: > > ZNorQ wrote: > > > > Hey, > > > > Do anyone know of a wildcard_match version that returns the position id for > > the first occurance of the search? > > > > The one that is included in the standard euphoria archives do only return > > true > > or false, or rather one and zero. > > > > Regards, > > Kenneth 'ZNorQ' Nilsson > > You can try EuRegExp in the archive, it will give you this sort of info and > more. It's an Euphoria-oriented regular expression library, mostly compatible > with Perl's conventions. > > CChris Hmm. As soon as I include it, I first get an error saying that EuRegExp.e has an error at line 443 - w has not been declared. So I added w to the sequence a few lines above, and tried again - but this time I got a new error; EuRegExp.e @ line 913; search_again takes 4 arguments else option-=8 z=search_again(s0,s1,options) ^ Is it me, or what? (Keep in mind, I haven't gotten around to use any of the code yet - it's just included!) Kenneth / ZNorQ
7. Re: wildcard_match; Return position
- Posted by CChris <christian.cuvier at agricul?ur?.gouv.fr> Mar 13, 2008
- 657 views
ZNorQ wrote: > > CChris wrote: > > > > ZNorQ wrote: > > > > > > Hey, > > > > > > Do anyone know of a wildcard_match version that returns the position id > > > for > > > the first occurance of the search? > > > > > > The one that is included in the standard euphoria archives do only return > > > true > > > or false, or rather one and zero. > > > > > > Regards, > > > Kenneth 'ZNorQ' Nilsson > > > > You can try EuRegExp in the archive, it will give you this sort of info and > > more. It's an Euphoria-oriented regular expression library, mostly > > compatible > > with Perl's conventions. > > > > CChris > > Hmm. As soon as I include it, I first get an error saying that EuRegExp.e has > an error at line 443 - w has not been declared. > > So I added w to the sequence a few lines above, and tried again - but this > time > I got a new error; > > EuRegExp.e @ line 913; search_again takes 4 arguments > else option-=8 z=search_again(s0,s1,options) > ^ > > Is it me, or what? > (Keep in mind, I haven't gotten around to use any of the code yet - it's just > included!) > > Kenneth / ZNorQ Sorry, I didn't check last night, but I will tonight. I haven't touched this code for years... CChris
8. Re: wildcard_match; Return position
- Posted by ZNorQ <znorq at h?lha?g.com> Mar 13, 2008
- 628 views
> Sorry, I didn't check last night, but I will tonight. I haven't touched this > code for years... > > CChris Rgr, thanks. However, I did solve the problem at hand, so the use of the archive isn't that urgent anymore. However, it would be nice to have these features ready for future use. Kenneth / ZNorQ
9. Re: wildcard_match; Return position
- Posted by CChris <christian.cuvier at agriculture?gouv.f?> Mar 16, 2008
- 636 views
ZNorQ wrote: > > > Sorry, I didn't check last night, but I will tonight. I haven't touched this > > code for years... > > > > CChris > > Rgr, thanks. > > However, I did solve the problem at hand, so the use of the archive isn't that > urgent anymore. However, it would be nice to have these features ready for > future > use. > > Kenneth / ZNorQ I just wrote this in test.exw:
include euregexp.e pretty_print(1,reg_search("[!d-i](2,4)","The quick brown fox",0),{2}) ?machine_func(26,0)
and it printed, as expected: { 4, {1,4}, "The", { { " q", "uick brown fox" }, { " qu", "ick brown fox" } }, { " quick brown fox", { { 0, 2, 4, 1, { " c", {106'j',255} } } } } } which is all explained in the docs. Does the above work for you? If so, could I see your code one way or another? My actual email is oedoc hat free doubt fr CChris