[Gambas-user] Multiline RegExp [slightly OT]

Caveat Gambas at ...1950...
Wed Jul 27 13:08:03 CEST 2011


There is no problem in your code, nor in the mail addresses you show as
examples, I was merely trying to point out a problem in the patent
system itself.

It seems as if Apple has manged to patent the "novel idea" of
recognising stuff (phone numbers, email addresses, web urls) in data,
high-lighting it, and allowing a user to interact with it and perform
some action on it.

As you quite rightly point out, it's not exactly a new idea to go thru a
chunk of data and pick out interesting patterns, nor to allow actions on
those recognised patterns (just look at any modern email client).

All I wanted to do was to point out just how silly the software patents
are becoming and that more and more the bleedin' obvious is somehow
getting recognised as a valid patent...

...and if you were to sell your program... what would you do if Apple's
lawyers came knocking on your door asking for money? :-/

Kind regards,
Caveat

On Wed, 2011-07-27 at 13:48 +0300, Demosthenes Koptsis wrote:
> sorry but i dont understand where is the patent problem.
> 
> There are many regexp which "recognize data" such emails. 
> So i think here is not the problem.
> See for example
> http://regexlib.com/Search.aspx?k=email&c=-1&m=-1&ps=20
> 
> 
> If you mean the @yahoo.com emails this is an example.
> 
> i can change it like 
> user1 at ...2625...
> user2 at ...2625...
> user3 at ...2625...
> user4 at ...2625...
> 
> Is it ok now?
> 
> On Wed, 2011-07-27 at 12:10 +0200, Caveat wrote:
> > I hope you realise that the work you're doing may result in you
> > infringing Apple's patent:
> > 
> > U.S. Patent No. 5,946,647 on a "system and method for performing an
> > action on a structure in computer-generated data" (in its complaint,
> > Apple provides examples such as the recognition of "phone numbers,
> > post-office addresses and dates" and the ability to perform "related
> > actions with that data"; one example is that "the system may receive
> > data that includes a phone number, highlight it for a user, and then, in
> > response to a user's interaction with the highlighted text, offer the
> > user the choice of making a phone call to the number")
> > 
> > This brings home to me just how broken the patent system is!
> > I hope more and more of us programmers start to realise it and do
> > whatever we can to fight against it.  I refused to submit anything for
> > patenting at my last employer, despite their continued efforts to bribe
> > and encourage us to patent anything and everything that could be
> > remotely considered patentable.
> > 
> > If you were to make your program commercially available, and offered the
> > user the possibility to (for example) send a mail to one of the
> > addresses you identified in the textarea, you would (according to Apple)
> > by guilty of patent infringement.  No matter that you've done all the
> > hard work yourself, that you haven't been near any of Apple's code for
> > doing this...
> > 
> > [Sorry to interrupt with this slightly off-topic rant!]
> > 
> > Kind regards,
> > Caveat
> > 
> > 
> > On Wed, 2011-07-27 at 10:34 +0300, Demosthenes Koptsis wrote:
> > > i used also Multiline
> > > http://gambasdoc.org/help/comp/gb.pcre/regexp/multiline?v3
> > > 
> > > and DotAll
> > > http://gambasdoc.org/help/comp/gb.pcre/regexp/dotall?v3
> > > 
> > > with this code
> > > 
> > > -------------------------
> > > ' Gambas class file
> > > 
> > > Private sRegExp As Regexp
> > > 
> > > Public Sub Form_Open()
> > > 
> > >   Me.Center
> > > 
> > > End
> > > 
> > > Public Sub btnMatch_Click()
> > > 
> > >   txtResults.Clear
> > >   
> > >   If IsNull(txtPattern.Text) Or IsNull(txtSubject.Text) Then Return
> > >   
> > >   sRegExp = New Regexp(txtSubject.Text, txtPattern.Text, 4)
> > >   
> > >   If sRegExp.Offset = -1 Then Return
> > >   
> > >   txtResults.Text = sRegExp.Text
> > > 
> > > End
> > > -------------------------
> > > 
> > > 1) The Subject of RegExp is:
> > > 
> > > Here is an email dimos at ...146... and text continues
> > > Here is an email kostas at ...146... and text continues
> > > Here is an email petros at ...146... and text continues
> > > Here is an email paul at ...146... and text continues
> > > 
> > > 2) The Pattern i use is:
> > > (?i)\b[a-z0-9._%\-]+@[a-z0-9._%\-]+\.[A-Z]{2,4}\b
> > > 
> > > 3) The result is only one email:
> > > dimos at ...146...
> > > 
> > > and not the rest of them.
> > > 
> > > 4) if i convert this pattern to grep syntax in terminal, grep gives all
> > > 4 emails. i want to implement a grep like funtcion with Gambas3
> > > 
> > > Thanks!
> > > 
> > > 
> > > 
> > > 
> > > On Wed, 2011-07-27 at 12:45 +1000, Ian Haywood wrote:
> > > > On Wed, Jul 27, 2011 at 8:34 AM, Bruce Bruen <bbruen at ...2308...> wrote:
> > > > > regexp only (ever) works on a line by line basis
> > > > by default yes, but:
> > > > http://gambasdoc.org/help/comp/gb.pcre/regexp/dotall
> > > > 
> > > > this makes the . cover newlines, so a regexp can span multiple lines
> > > > in the string.
> > > > 
> > > > Ian
> > > > 
> > > > ------------------------------------------------------------------------------
> > > > Got Input?   Slashdot Needs You.
> > > > Take our quick survey online.  Come on, we don't ask for help often.
> > > > Plus, you'll get a chance to win $100 to spend on ThinkGeek.
> > > > http://p.sf.net/sfu/slashdot-survey
> > > > _______________________________________________
> > > > Gambas-user mailing list
> > > > Gambas-user at lists.sourceforge.net
> > > > https://lists.sourceforge.net/lists/listinfo/gambas-user
> > > 
> > 
> > 
> > 
> > ------------------------------------------------------------------------------
> > Got Input?   Slashdot Needs You.
> > Take our quick survey online.  Come on, we don't ask for help often.
> > Plus, you'll get a chance to win $100 to spend on ThinkGeek.
> > http://p.sf.net/sfu/slashdot-survey
> > _______________________________________________
> > Gambas-user mailing list
> > Gambas-user at lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/gambas-user
> 






More information about the User mailing list