On Fri, Aug 22, 2014 at 4:32 PM, Thierry Douez th.do...@gmail.com wrote:
As I said, the problem was: /
needed to be: a \ backslash delimiting the / forward slash.
Really?
Mind you trying this simple one which works here
and without any backslash!
Typical (for me anyway) that worked
Kay-
Friday, August 22, 2014, 11:36:11 PM, you wrote:
So I looked into this and there is NO requirement to use \ to delimit
the / char in PCRE grep. On further investigation it appears to be a
limitation of the online grep tester which uses the / char to enclose
the grep string so the server
Kay,
As I said, the problem was: /
needed to be: a \ backslash delimiting the / forward slash.
Really?
Mind you trying this simple one which works here
and without any backslash!
on mouseUp
put rtyrtyyrtyryt Hdfdfddfdfdfdf /H qwewqwqe into T
put (?Ptag[A-Z])[^]*(.*?)/(?P=tag) into
Thierry-
Friday, August 22, 2014, 1:32:30 AM, you wrote:
Could you show me in the regular expression docs why
do we have to escape a slash?
I would be very much interested to
have a small stack with the code and the datas
as I'm collecting snippets for a day to make some HowTos..
I will
Here is a simple one:
put (?Ptag[A-Z][A-Z0-9]*)\b[^]*.*?/(?P=tag) into RX
if matchText( anyHtmlText, RX) then put Get it!
Ok, just received 2 another positives feedback that this regex is valid!
even with the latest LC x.x DP x versions. So, we are 3 by now.
And please, avoid coming
Thierry Douez wrote:
Check capture group naming and branch reset.
Thanks Thierry, completely unaware of those. A quick play and I
couldn't get capture group naming to work with LC
Kay,
Here is a simple one:
put (?Ptag[A-Z][A-Z0-9]*)\b[^]*.*?/(?P=tag) into RX
if matchText(
Hi Thierry,
OK, well, cool But can you help me understand?
Do you mean if I put this in the message box, making the replacements you
suggest:
put replaceText(abcd,(ab)(cd),\2\1)
I should get:
cdab
Because I get:
\2\1
What am I missing?
Cheers,
- Charles
On 12 Aug 2014, at
2014-08-13 10:45 GMT+02:00 Charles E Buchwald char...@buchwald.ca:
Hi Thierry,
Do you mean if I put this in the message box, making the replacements you
suggest:
put replaceText(abcd,(ab)(cd),\2\1)
I should get:
cdab
Because I get:
\2\1
What am I missing?
Umm, well, I
You can use back references in the *pattern matching text*,
but not in the replacement text.
Here is one working:
put replaceText( IILLoovveeRReeggeexx, (.)(?!\1), empty )
Not sure everybody will agree with the result :)
Regards,
Thierry
On Wed, Aug 13, 2014 at 3:21 AM, Thierry Douez th.do...@gmail.com wrote:
put replaceText( IILLoovveeRReeggeexx, (.)(?!\1), empty )
Very clever Thierry! These back references are very useful.
Pete
lcSQL Software http://www.lcsql.com
Home of lcStackBrowser
On Wed, Aug 13, 2014 at 3:21 PM, Thierry Douez th.do...@gmail.com wrote:
Here is a simple one:
put (?Ptag[A-Z][A-Z0-9]*)\b[^]*.*?/(?P=tag) into RX
if matchText( anyHtmlText, RX) then put Get it!
Unfortunately not. At first I thought it was because I was using the
msg box which was
Kay,
put (?Ptag[A-Z][A-Z0-9]*)\b[^]*.*?/(?P=tag) into RX
if matchText( anyHtmlText, RX) then put Get it!
Unfortunately not.
Just tried it right now and it works!
What system and LC version do you have?
Are you sure the copy/paste didn't spoil the original regex
or what else could
Agree - matchText and matchChunk would both benefit from the ability to
specify an array to fill with matches - we don't always know exactly how
many will appear ..
http://quality.runrev.com/show_bug.cgi?id=11391
On 12/08/2014 02:12, Peter Haworth wrote:
I've always kinda thought the return
On Tue, Aug 12, 2014 at 1:56 AM, John Craig j...@splash21.com wrote:
http://quality.runrev.com/show_bug.cgi?id=11391
Thanks John, added this me to the cc list and also added a comment.
Pete
lcSQL Software http://www.lcsql.com
Home of lcStackBrowser http://www.lcsql.com/lcstackbrowser.html and
I've taken to using regex for input data validation, for example, email
addresses, SSN, telephone numbers, URL,even stripping leading/trailing
spaces. There are various regex libraries online where people have
contributed expressions for those purposes.
I just like the fact that one line of code
Yes, but just having a more complete implementation of PCRE regex would make a
big difference.
For example, LC's regex does not include back references.
Having the ability to use (PCRE compliant) back references would, I believe, in
many case, eliminate the need for that array of matches.
For
Good point, that would be a nice enhancement.
Pete
lcSQL Software http://www.lcsql.com
Home of lcStackBrowser http://www.lcsql.com/lcstackbrowser.html and
SQLiteAdmin http://www.lcsql.com/sqliteadmin.html
On Tue, Aug 12, 2014 at 11:51 AM, Charles E Buchwald char...@buchwald.ca
wrote:
Yes, but
I see it is powerful and has a good value. I use it for some things
already but when it gets to more complex if then else replace code
it is still too complicated for me.
John Balgenorth
On Aug 12, 2014, at 10:11 AM, Peter Haworth p...@lcsql.com wrote:
I've taken to using regex for input
On Mon, Aug 11, 2014 at 10:38 PM, Thierry Douez th.do...@gmail.com wrote:
Check capture group naming and branch reset.
Thanks Thierry, completely unaware of those. A quick play and I
couldn't get capture group naming to work with LC but branch reset I
could, so that is most useful. Still for
Yes, but just having a more complete implementation of PCRE regex would make
a big difference.
For example, LC's regex does not include back references.
Having the ability to use (PCRE compliant) back references would, I believe,
in many case, eliminate the need for that array of matches.
2014-08-10 5:15 GMT+02:00
Kay C Lan lan.kc.macm...@gmail.com:
It is easy, when copying regex off such sites listed above, or
building your own, and you know you are only finding x number of data
bites, to assume that that is how many capture variables you need, but
if OR is used, then you can
On Mon, Aug 11, 2014 at 7:38 AM, Thierry Douez th.do...@gmail.com wrote:
As one engine contributor brings the PCRE library (regex) up
to date some time ago, it is easy to deal with this:
Check capture group naming and branch reset.
Both are helpful to avoid those kind of errors.
Thierry
I have very occasionally tried regex and can see that it is very powerful, but
to me it's also extremely opaque and I've never climbed far up the rather steep
learning curve. Partly this is because I've found that essentially all of the
stuff I would need regex for is do-able in native LC,
That is nice to know!
I was thinking I would speed up the
longer text processing. You just did
me a favor and save me a lot of time
plus made it easier and faster by not
using regex for text processing.
I still appreciate the info others gave
because I know I will use regex from
time to time.
Regex is GREAT!
I use it a LOT.
Anyone need any help to grasp how it works ?
On Monday, August 11, 2014 10:14:28 PM, JB sund...@pacifier.com wrote:
That is nice to know!
I was thinking I would speed up the
longer text processing. You just did
me a favor and save me a lot of time
plus
I was interested in using a if then replace combination
but it seems it might be better done in LiveCode using
repeat for each. If the speed is not considerably faster
with regex it is not worth the trouble. The ability to read
my code like I am used to is more important than a small
increase in
Alain Farmer wrote:
Regex is GREAT!
I use it a LOT.
Anyone need any help to grasp how it works ?
Funny you should ask that - there was a request recently in the forums
for a RegEx tutorial:
http://forums.livecode.com/viewtopic.php?f=6t=21280
Such a tutorial would be a great addition to
It would take a tutorial and one would be
worth reading.
John Balgenorth
On Aug 11, 2014, at 8:27 PM, Richard Gaskin ambassa...@fourthworld.com wrote:
Alain Farmer wrote:
Regex is GREAT!
I use it a LOT.
Anyone need any help to grasp how it works ?
Funny you should ask that -
Revolution Standard Library was put together by
Richard Gaskin and Ken Ray and provides a lot
of useful handlers.
Is the code allowed to be used in a commercial
program royalty free and if so what would be the
proper information to list in the product showing
it is being used and plus the proper
When I am asking about using the code I
do not mean using all of the code I only
mean using small parts of it which would
be what appears it is made for.
John Balgenorth
On Aug 9, 2014, at 5:09 PM, JB sund...@pacifier.com wrote:
Revolution Standard Library was put together by
Richard Gaskin
JB wrote:
Revolution Standard Library was put together by
Richard Gaskin and Ken Ray and provides a lot
of useful handlers.
May I ask which ones you found useful? It might just motivate me to
resume the project.
Is the code allowed to be used in a commercial
program royalty free
a little bit of money.
thanks again,
John Balgenorth
On Aug 9, 2014, at 5:37 PM, Richard Gaskin ambassa...@fourthworld.com wrote:
JB wrote:
Revolution Standard Library was put together by
Richard Gaskin and Ken Ray and provides a lot
of useful handlers.
May I ask which ones you found useful
Richard-
Saturday, August 9, 2014, 5:37:14 PM, you wrote:
May I ask where you stumbled across it? If we still have that posted
online we should definitely put a proper license on it.
It is indeed still online:
On Sun, Aug 10, 2014 at 9:08 AM, JB sund...@pacifier.com wrote:
One of the things I am interested in seeing more handlers
and examples is regex. It seems to be a very powerful
tool with very few LiveCode examples.
The matchChunk and matchText functions are pretty straight forward to
use, it's
Thanks for the info about regex. I bookmarked
the website and will be using your advice. I am
pretty new to regex and even though I’ve spent
a lot of time researching it you have helped me
tremendously.
John Balgenorth
On Aug 9, 2014, at 8:15 PM, Kay C Lan lan.kc.macm...@gmail.com wrote:
On
35 matches
Mail list logo