Regex - help me get the grips with it...

Soldato
Joined
12 Jun 2005
Posts
5,361
Hi there,

Still don't know how to use this probably, I have a feeling i may have posted topics on this before, but want to get it under my belt once and for all! :p

....anywho, I was wondering if anyone had a good online tutorials that i could read, or even better Video tutorials (i can learn easier from those).

....also, I was wondering if there is any good freeware so I can practise on....So I have had a string and have an input box for a regualar expression and run it and it'll give me the result. Possibly a plugin for notepad++?

Thanks.
 
Right i am having problems with finding someone inbetween something else but not including it in the result.

For instance if i have:

Code:
...<b>hey stuff 10sdd f</b>...

What I want is:

Code:
hey stuff 10sdd f

What i am using is this:

Code:
<b>(.*)</b>

...and I think that the stuff between the brackets it captured to a parameter without the <b> tags.....but i am unsure of how to get that parameter. I am using C#.NET

Thanks.
 
Found, what i am looking for.

In .NET it seems when i run that code it gives me two results....one with the <b> tag and one without.

Thanks.
 
Dj_jester

Does it do the same in PHP, what would the result be for this:

Code:
preg_replace('<b>(.*)</b>', '[b]$0[/b]', $aString);

....would it replace the whole string?
 
Back
Top Bottom