Regular Expression help - Replacing Regexp that worked with Oniguruma in 1.8.6

Hi

On our way to shifting to Ruby 1.8.7 - away from the beloved
Oniguruma-Patch - I am tripping over our usefull regular expression used
in Ruby 1.8.6 - so if anybody is strong in refactoring regular
expressions, please let me know.

sample one:

http://choddb.rubyforge.org/ODDB/SwissmedicPlugin.html

%r{excipiens\s+(ad|pro)\s+(?((?!\bpro\b)[^.])+)}u

and

%r{pro\s+(?(?[\d.,]+)\s*(?[kcmuµn]?[glh]))}u

And this one on line 148

All three samples need to work in Ruby 1.8.7 and in 1.9.2.

They currently work perfectly fine in Ruby 1.8.6 with the beloved
Oniguruma-Patch V2.5.9

Any hints or Feedback is welcome.

Best
Zeno

On Sun, Feb 20, 2011 at 8:31 PM, Zeno D. [email protected] wrote:

They currently work perfectly fine in Ruby 1.8.6 with the beloved
Oniguruma-Patch V2.5.9

Any hints or Feedback is welcome.

Can you give hints about what exactly you are asking? Do you have
syntax errors, do the expressions not match? What is the reason for
your posting?

Ideally you would provide sample code and text to match.

Cheers

robert

Dear Robert

On 21 Feb., 03:15, Robert K. [email protected] wrote:

%r{excipiens\s+(ad|pro)\s+(?((?!\bpro\b)[^.])+)}u

They currently work perfectly fine in Ruby 1.8.6 with the beloved
Oniguruma-Patch V2.5.9

Any hints or Feedback is welcome.

Can you give hints about what exactly you are asking? Do you have
syntax errors, do the expressions not match? What is the reason for
your posting?

Basically our software does not start-up with Ruby 1.8.7 and with Ruby
1.9.2 as Oniguruma is missing.

Ideally you would provide sample code and text to match.

Ok, I will try to produce these beyond what I already supplied above.

Best
Zeno

Good Afternoon,

On Sun, Feb 20, 2011 at 11:31 AM, Zeno D. [email protected] wrote:

Hi

On our way to shifting to Ruby 1.8.7 - away from the beloved
Oniguruma-Patch - I am tripping over our usefull regular expression used
in Ruby 1.8.6 - so if anybody is strong in refactoring regular
expressions, please let me know.

Could you provide some samples of inputs and what you expect/are getting
out
of the expressions. Rather difficult to ensure one can be of assistance
without knowing the specific targets…

John

On Feb 21, 2011, at 00:15 , Robert K. wrote:

Can you give hints about what exactly you are asking? Do you have
syntax errors, do the expressions not match? What is the reason for
your posting?

He’s just taking another opportunity to complain that a patch that he
privately applied to 1.8.6 wasn’t applied to 1.8.7 or 1.9. Instead of
either sticking to what he likes or migrating his code (in this case
named groups–really not hard if he’d just think about it), he’s
complaining. Again. Ad nauseum. Just like he did on [email protected]

On Mon, Feb 21, 2011 at 5:40 PM, Zeno R.R. Davatz [email protected]
wrote:

http://url.ba/kxez
your posting?

Basically our software does not start-up with Ruby 1.8.7 and with Ruby
1.9.2 as Oniguruma is missing.

Since when is Oniguruma missing from 1.9.2???

09:14:24 ~$ for e in ruby ruby19; do $e -v; $e -ce ‘/(?)/’; done
ruby 1.8.7 (2008-08-11 patchlevel 72) [i386-cygwin]
-e:1: undefined (?..) sequence: /(?)/
ruby 1.9.2p136 (2010-12-25 revision 30365) [i386-cygwin]
Syntax OK
09:14:33 ~$

If you migrate away from 1.8.6 then why do you switch to 1.8.7 and not
1.9.* which is significantly faster and has Oniguruma?

Ideally you would provide sample code and text to match.

Ok, I will try to produce these beyond what I already supplied above.

Yes, I think you should do that.

Kind regards

robert

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs