Expiring Today—Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

php regular expressions

Posted on 2006-06-20
2
Medium Priority
?
233 Views
Last Modified: 2010-07-27
Hi

I have a perl expression which reads

$l =~ s/^V\#REPLACEME^X^Y^W/$somevariable/

can you tell me if  in php

ereg_replace("(.*)^V\#REPLACEME^X^Y^W(.*)", $replacestring, $originaldata)

is the right way of writing the same regex?

thanks in advance

0
Comment
Question by:Vlearns
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 7

Accepted Solution

by:
maUru earned 2000 total points
ID: 16941206
echo preg_replace('/^V\#REPLACEME^X^Y^W/', $somevariable, $originaldata)

would probably be the right way, although for the life of me i cant understand what the point of ^V ^X^Y^Z is for.
0
 

Author Comment

by:Vlearns
ID: 16949008
thanks a million
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Things That Drive Us Nuts Have you noticed the use of the reCaptcha feature at EE and other web sites?  It wants you to read and retype something that looks like this. Insanity!  It's not EE's fault - that's just the way reCaptcha works.  But it i…
These days socially coordinated efforts have turned into a critical requirement for enterprises.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

730 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question