Help | Site Map
Connecting Tech Pros Worldwide
 
 
LinkBack Thread Tools
  #1  
Old July 17th, 2005, 10:58 AM
chris
Guest
 
Posts: n/a
Default regex

i can see the power of regular expressions but am having a bit of a battle
getting my head around them.

can anyone recommend some BASIC - tutorials for using regex

something like th idots guide :)
or even total idiots guide :)

somewhere that has some simple examples would be good toooo

any help would be fantastic

Chris


  #2  
Old July 17th, 2005, 10:58 AM
chris
Guest
 
Posts: n/a
Default Re: regex

i just had a thought

is there any program that will create a regex
for example you select the criteria and it generate an appropriate regex



"chris" <someone@here.com> wrote in message
news:41bc0ec4$1@funnel.arach.net.au...[color=blue]
>i can see the power of regular expressions but am having a bit of a battle
>getting my head around them.
>
> can anyone recommend some BASIC - tutorials for using regex
>
> something like th idots guide :)
> or even total idiots guide :)
>
> somewhere that has some simple examples would be good toooo
>
> any help would be fantastic
>
> Chris
>[/color]


  #3  
Old July 17th, 2005, 10:58 AM
d
Guest
 
Posts: n/a
Default Re: regex

I'm sure there is, but whether you'd want to use one is a different matter.
Have you considered just messing around with regex after reading a tutorial?
Everyone I know who uses regex learned that way - if you become reliant on
software to write your code, you can find yourself in sticky situations ;)

d

"chris" <someone@here.com> wrote in message
news:41bc0ff7$1@funnel.arach.net.au...[color=blue]
>i just had a thought
>
> is there any program that will create a regex
> for example you select the criteria and it generate an appropriate regex
>
>
>
> "chris" <someone@here.com> wrote in message
> news:41bc0ec4$1@funnel.arach.net.au...[color=green]
>>i can see the power of regular expressions but am having a bit of a battle
>>getting my head around them.
>>
>> can anyone recommend some BASIC - tutorials for using regex
>>
>> something like th idots guide :)
>> or even total idiots guide :)
>>
>> somewhere that has some simple examples would be good toooo
>>
>> any help would be fantastic
>>
>> Chris
>>[/color]
>
>[/color]


  #4  
Old July 17th, 2005, 10:58 AM
chris
Guest
 
Posts: n/a
Default Re: regex

i understand what u are saying and i agree - i would find it handy to be
able to create the regex BUt i would also work out how it does it and
eventually not use it

i have played arount with it but am still not quite understanding it - a
heap od examples would be great

like in one site i saw this and i thought it was good

/ # identify URLs within a text file
[^="] # do not match URLs in IMG tags like:
# <img src="http://mysite.com/mypic.png">
http|ftp|gopher # make sure we find a resource type
:\/\/ # ...needs to be followed by colon-slash-slash
[^ \n\r]+ # some stuff than space, newline, tab is in URL
(?=[\s\.,]) # assert: followed by whitespace/period/comma
/

More examples like thaT WOULD BE GOOD
"d" <d@example.com> wrote in message
news:niVud.12519$qr4.6085@fe2.news.blueyonder.co.u k...[color=blue]
> I'm sure there is, but whether you'd want to use one is a different
> matter. Have you considered just messing around with regex after reading a
> tutorial? Everyone I know who uses regex learned that way - if you become
> reliant on software to write your code, you can find yourself in sticky
> situations ;)
>
> d
>
> "chris" <someone@here.com> wrote in message
> news:41bc0ff7$1@funnel.arach.net.au...[color=green]
>>i just had a thought
>>
>> is there any program that will create a regex
>> for example you select the criteria and it generate an appropriate regex
>>
>>
>>
>> "chris" <someone@here.com> wrote in message
>> news:41bc0ec4$1@funnel.arach.net.au...[color=darkred]
>>>i can see the power of regular expressions but am having a bit of a
>>>battle getting my head around them.
>>>
>>> can anyone recommend some BASIC - tutorials for using regex
>>>
>>> something like th idots guide :)
>>> or even total idiots guide :)
>>>
>>> somewhere that has some simple examples would be good toooo
>>>
>>> any help would be fantastic
>>>
>>> Chris
>>>[/color]
>>
>>[/color]
>
>[/color]


  #5  
Old July 17th, 2005, 10:58 AM
Pedro Graca
Guest
 
Posts: n/a
Default Re: regex

["Followup-To:" header set to comp.lang.php.]
chris wrote:[color=blue]
> i can see the power of regular expressions but am having a bit of a battle
> getting my head around them.[/color]

Try "regex-coach"
http://www.weitz.de/regex-coach/
[color=blue]
> can anyone recommend some BASIC - tutorials for using regex[/color]

The first Google hit for "regular expression tutorial" (no quotes) was
http://www.regular-expressions.info/tutorial.html

--
Mail to my "From:" address is readable by all at http://www.dodgeit.com/
== ** ## !! ------------------------------------------------ !! ## ** ==
TEXT-ONLY mail to the whole "Reply-To:" address ("My Name" <my@address>)
may bypass my spam filter. If it does, I may reply from another address!
  #6  
Old July 17th, 2005, 10:58 AM
d
Guest
 
Posts: n/a
Default Re: regex

Have you checked out PHP's manual? It has extensive documentation of PHP's
regex support. Once you're familiar with the terminology, it has everything
you need to know.

I checked out google for some more sites, and this one came up:

http://www.regular-expressions.info/

Let me know if it's not good ;)

"chris" <someone@here.com> wrote in message
news:41bc2f0b$1@funnel.arach.net.au...[color=blue]
>i understand what u are saying and i agree - i would find it handy to be
>able to create the regex BUt i would also work out how it does it and
>eventually not use it
>
> i have played arount with it but am still not quite understanding it - a
> heap od examples would be great
>
> like in one site i saw this and i thought it was good
>
> / # identify URLs within a text file
> [^="] # do not match URLs in IMG tags like:
> # <img src="http://mysite.com/mypic.png">
> http|ftp|gopher # make sure we find a resource type
> :\/\/ # ...needs to be followed by colon-slash-slash
> [^ \n\r]+ # some stuff than space, newline, tab is in URL
> (?=[\s\.,]) # assert: followed by whitespace/period/comma
> /
>
> More examples like thaT WOULD BE GOOD
> "d" <d@example.com> wrote in message
> news:niVud.12519$qr4.6085@fe2.news.blueyonder.co.u k...[color=green]
>> I'm sure there is, but whether you'd want to use one is a different
>> matter. Have you considered just messing around with regex after reading
>> a tutorial? Everyone I know who uses regex learned that way - if you
>> become reliant on software to write your code, you can find yourself in
>> sticky situations ;)
>>
>> d
>>
>> "chris" <someone@here.com> wrote in message
>> news:41bc0ff7$1@funnel.arach.net.au...[color=darkred]
>>>i just had a thought
>>>
>>> is there any program that will create a regex
>>> for example you select the criteria and it generate an appropriate regex
>>>
>>>
>>>
>>> "chris" <someone@here.com> wrote in message
>>> news:41bc0ec4$1@funnel.arach.net.au...
>>>>i can see the power of regular expressions but am having a bit of a
>>>>battle getting my head around them.
>>>>
>>>> can anyone recommend some BASIC - tutorials for using regex
>>>>
>>>> something like th idots guide :)
>>>> or even total idiots guide :)
>>>>
>>>> somewhere that has some simple examples would be good toooo
>>>>
>>>> any help would be fantastic
>>>>
>>>> Chris
>>>>
>>>
>>>[/color]
>>
>>[/color]
>
>[/color]


  #7  
Old July 17th, 2005, 10:58 AM
Tim Van Wassenhove
Guest
 
Posts: n/a
Default Re: regex

In article <slrncrof11.ln2.hexkid@ID-203069.user.uni-berlin.de>, Pedro Graca wrote:[color=blue]
> ["Followup-To:" header set to comp.lang.php.]
> chris wrote:[color=green]
>> i can see the power of regular expressions but am having a bit of a battle
>> getting my head around them.[/color]
>
> Try "regex-coach"
> http://www.weitz.de/regex-coach/
>[color=green]
>> can anyone recommend some BASIC - tutorials for using regex[/color]
>
> The first Google hit for "regular expression tutorial" (no quotes) was
> http://www.regular-expressions.info/tutorial.html[/color]

to complement the other urls

http://www.samuelfullman.com/team/ph...n_tester_p.php



--
Met vriendelijke groeten,
Tim Van Wassenhove <http://www.timvw.info>
  #8  
Old July 17th, 2005, 10:59 AM
Harrie Verveer
Guest
 
Posts: n/a
Default Re: regex

I had exactly the same a few weeks ago =D

luckily I had lessons 'regular expressions' at my school a while ago
(eregi-style) of which i was very thankfull when I found out the power
of regex in php.

just start with some simple regular expressions, like converting \n to
<BR> (yes i know there is nl2br, but just as a practice). Then try to
strip all HTML tags out of a string. etc etc. start simple and make it
yourself more difficult every time.

If you really want to master regex en become a regex guru, I'd advise to
buy yourself a book on regular expressions.

Good luck with regex (they are fun to do =D)

I know you can do it tiger!

harrie

chris wrote:[color=blue]
> i can see the power of regular expressions but am having a bit of a battle
> getting my head around them.
>
> can anyone recommend some BASIC - tutorials for using regex
>
> something like th idots guide :)
> or even total idiots guide :)
>
> somewhere that has some simple examples would be good toooo
>
> any help would be fantastic
>
> Chris
>
>[/color]
  #9  
Old July 17th, 2005, 11:00 AM
Ged Robinson
Guest
 
Posts: n/a
Default Re: regex


"chris" <someone@here.com> wrote in message
news:41bc0ff7$1@funnel.arach.net.au...[color=blue]
> i just had a thought
>
> is there any program that will create a regex
> for example you select the criteria and it generate an appropriate regex
>
>
>
> "chris" <someone@here.com> wrote in message
> news:41bc0ec4$1@funnel.arach.net.au...[color=green]
> >i can see the power of regular expressions but am having a bit of a[/color][/color]
battle[color=blue][color=green]
> >getting my head around them.
> >
> > can anyone recommend some BASIC - tutorials for using regex
> >
> > something like th idots guide :)
> > or even total idiots guide :)
> >
> > somewhere that has some simple examples would be good toooo
> >
> > any help would be fantastic
> >
> > Chris
> >[/color]
>
>[/color]


  #10  
Old July 17th, 2005, 11:00 AM
Ged Robinson
Guest
 
Posts: n/a
Default Re: regex

Chris,

www.regexbuddy.com has just what you're looking for.

I learned to compose regex's the "manual" way - which I agree is the best,
nevertheless, this tool still comes in handy sometimes.

Ged

"chris" <someone@here.com> wrote in message
news:41bc0ff7$1@funnel.arach.net.au...[color=blue]
> i just had a thought
>
> is there any program that will create a regex
> for example you select the criteria and it generate an appropriate regex
>
>
>
> "chris" <someone@here.com> wrote in message
> news:41bc0ec4$1@funnel.arach.net.au...[color=green]
> >i can see the power of regular expressions but am having a bit of a[/color][/color]
battle[color=blue][color=green]
> >getting my head around them.
> >
> > can anyone recommend some BASIC - tutorials for using regex
> >
> > something like th idots guide :)
> > or even total idiots guide :)
> >
> > somewhere that has some simple examples would be good toooo
> >
> > any help would be fantastic
> >
> > Chris
> >[/color]
>
>[/color]


  #11  
Old July 17th, 2005, 11:01 AM
Good Man
Guest
 
Posts: n/a
Default Re: regex

"chris" <someone@here.com> wrote in news:41bc0ec4$1@funnel.arach.net.au:
[color=blue]
> i can see the power of regular expressions but am having a bit of a
> battle getting my head around them.
>
> can anyone recommend some BASIC - tutorials for using regex[/color]

http://dinki.mine.nu/word/regex/regex.php
  #12  
Old July 17th, 2005, 11:01 AM
drwxr-xr-x
Guest
 
Posts: n/a
Default Re: regex

On Tue, 14 Dec 2004 09:32:07 -0600, Good Man hath writ:[color=blue]
> "chris" <someone@here.com> wrote in news:41bc0ec4$1@funnel.arach.net.au:
>[color=green]
>> i can see the power of regular expressions but am having a bit of a
>> battle getting my head around them.
>>
>> can anyone recommend some BASIC - tutorials for using regex[/color]
>
> http://dinki.mine.nu/word/regex/regex.php[/color]

....best viewed in lynx.
  #13  
Old July 17th, 2005, 11:32 AM
Yevgen Varavva
Guest
 
Posts: n/a
Default Re: regex

http://hq.alert.sk/~nite/docs/master...ssions.pdf.bz2


 

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles