Connecting Tech Pros Worldwide Help | Site Map

regex

chris
Guest
 
Posts: n/a
#1: Jul 17 '05
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


chris
Guest
 
Posts: n/a
#2: Jul 17 '05

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]


d
Guest
 
Posts: n/a
#3: Jul 17 '05

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]


chris
Guest
 
Posts: n/a
#4: Jul 17 '05

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]


Pedro Graca
Guest
 
Posts: n/a
#5: Jul 17 '05

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!
d
Guest
 
Posts: n/a
#6: Jul 17 '05

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]


Tim Van Wassenhove
Guest
 
Posts: n/a
#7: Jul 17 '05

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>
Harrie Verveer
Guest
 
Posts: n/a
#8: Jul 17 '05

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]
Ged Robinson
Guest
 
Posts: n/a
#9: Jul 17 '05

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]


Ged Robinson
Guest
 
Posts: n/a
#10: Jul 17 '05

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]


Good Man
Guest
 
Posts: n/a
#11: Jul 17 '05

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
drwxr-xr-x
Guest
 
Posts: n/a
#12: Jul 17 '05

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.
Yevgen Varavva
Guest
 
Posts: n/a
#13: Jul 17 '05

re: regex


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


Closed Thread