Regular Expressions

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Regular Expressions

Edgar De Cleene
Folks:
I wish remove tags from HTMlL
According to https://regex101.com/ and http://www.freeformatter.com/regex-tester.html and also of my old Nissus Pro.

<.+?>

Should be a valid expression.

But

 regex|
regex := RxMatcher forString: '<.+?>’.

Gives my an error.

Any help ?

Edgar
@morplenauta
_______________________________________________
Cuis mailing list
[hidden email]
http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org
Reply | Threaded
Open this post in threaded view
|

Re: Regular Expressions

KenDickey
On Fri, 18 Nov 2016 10:39:52 -0300
Edgar De Cleene <[hidden email]> wrote:

> Folks:
> I wish remove tags from HTMlL
> According to https://regex101.com/ and http://www.freeformatter.com/regex-tester.html and also of my old Nissus Pro.
>
> <.+?>
>
> Should be a valid expression.
>
> But
>
>  regex|
> regex := RxMatcher forString: '<.+?>’.
>
> Gives my an error.
>
> Any help ?

Edgar,

Sorry for the delay.  Busy lives..


I found https://github.com/garduino/Cuis-Smalltalk-RegEx but this code is very old and simply loaded fails most test cases (see notes below).

The Cuis-Smalltalk-RegEx code definitely signals an error for the example you site, even though
  RegEx-Core RxParser DOCUMENTATION c:syntax:
description would appear to support this use case.


What source of RegEx are you using?  Is there a Cuis Package available?


Note that I have zero experience with this package but am happy to help out as I get time.

Best wishes,
-KenD

=========================================================
https://github.com/garduino/Cuis-Smalltalk-RegEx notes:

1) Needs requirements (tests should require core should require Squeak compatibility).

2) Line endings should be newLines.

3) Needs added compatibility methods, e.g.:

'
Array>>contains: other
       
        ^ self includes: other
'

'
Character>>sameAs: otherChar
        "Case independent compare"

        (self class) = (otherChar class) ifFalse: [ ^ false ].
       
        ^(self asLowercase) = (otherChar asLowercase)
'
=========================================================


_______________________________________________
Cuis mailing list
[hidden email]
http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org
-KenD
Reply | Threaded
Open this post in threaded view
|

Re: Regular Expressions

Phil B

I've got a port of Vasilli's version in github.com/Cuis-Ports I've been using that pretty extensively for years without issues


On Nov 22, 2016 11:31 AM, "KenD" <[hidden email]> wrote:
On Fri, 18 Nov 2016 10:39:52 -0300
Edgar De Cleene <[hidden email]> wrote:

> Folks:
> I wish remove tags from HTMlL
> According to https://regex101.com/ and http://www.freeformatter.com/regex-tester.html and also of my old Nissus Pro.
>
> <.+?>
>
> Should be a valid expression.
>
> But
>
>  regex|
> regex := RxMatcher forString: '<.+?>’.
>
> Gives my an error.
>
> Any help ?

Edgar,

Sorry for the delay.  Busy lives..


I found https://github.com/garduino/Cuis-Smalltalk-RegEx but this code is very old and simply loaded fails most test cases (see notes below).

The Cuis-Smalltalk-RegEx code definitely signals an error for the example you site, even though
  RegEx-Core RxParser DOCUMENTATION c:syntax:
description would appear to support this use case.


What source of RegEx are you using?  Is there a Cuis Package available?


Note that I have zero experience with this package but am happy to help out as I get time.

Best wishes,
-KenD

=========================================================
https://github.com/garduino/Cuis-Smalltalk-RegEx notes:

1) Needs requirements (tests should require core should require Squeak compatibility).

2) Line endings should be newLines.

3) Needs added compatibility methods, e.g.:

'
Array>>contains: other

        ^ self includes: other
'

'
Character>>sameAs: otherChar
        "Case independent compare"

        (self class) = (otherChar class) ifFalse: [ ^ false ].

        ^(self asLowercase) = (otherChar asLowercase)
'
=========================================================


_______________________________________________
Cuis mailing list
[hidden email]
http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org

_______________________________________________
Cuis mailing list
[hidden email]
http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org
Reply | Threaded
Open this post in threaded view
|

Re: Regular Expressions

KenDickey
On Fri, 25 Nov 2016 17:53:49 -0500
Phil B <[hidden email]> wrote:

> I've got a port of Vasilli's version in github.com/Cuis-Ports I've been
> using that pretty extensively for years without issues

Thanks Phil!!  Saved me much time.

Germán's port has more unit tests, at least one of which does an infinite loop on the VbRegex version.

I cross checked both ports and integrated the Cuis updates into the one cloned from Germán's.

All unit tests show green in:

  https://github.com/KenDickey/Cuis-Smalltalk-RegEx


I am not a parser guy and only a very light-weight RegEx user, so please everyone, feel free to test this and send me bugs/fixes/updates.

Thanks much!
-KenD

_______________________________________________
Cuis mailing list
[hidden email]
http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org
-KenD