Go Back   CodingForums.com > :: Server side development > PHP

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 12-20-2012, 08:11 PM   PM User | #1
abell12
New Coder

 
Join Date: Mar 2012
Posts: 31
Thanks: 1
Thanked 1 Time in 1 Post
abell12 is an unknown quantity at this point
Help understanding this expression

I have this code which works how I want it but im not sure what is happening.
Can someone explain what is happening which each character.
Changing different parts of the expression to a different colour will also help.

PHP Code:
preg_replace('/(?!^.?).(?!.{0}$)/''*'$word_found); 
Say the word is 'replace'
It results in this:
r*****e

Thanks in advance.
abell12 is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

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 On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 11:14 AM.


Advertisement
Log in to turn off these ads.