Breaking the ice . . .

A discussion of how to use EasyPatterns, EasyPattern Helper and using the EasyPattern library.

Moderator: DataMystic Support

GreyHead
Posts: 1
Joined: Mon May 17, 2004 5:31 pm

Breaking the ice . . .

Postby GreyHead » Mon May 17, 2004 5:35 pm

I guess that there has to be a first post here.

I tried to use Easy Pattern helper yesterday and ran into blank. I tried the Reference but while I could see the bits of what I wanted to do I couldn't work out how to srting them together.

I'm trying to change the header blocks in a whole bunch of about 500 php files. With plain text lines this works fine. Then I came to this:

// $Id: index.php,v 1.4 2004/05/16 14:04:19 greyhead Exp $
/**

-where the blue bit is variable. That I want to replace with this:
/**
// $Id: index.php,v 1.4 2004/05/16 14:04:19 greyhead Exp $
*


I could find the string OK, but completely failed to get groups capture to work :-(

Bob

User avatar
DataMystic Support
Site Admin
Posts: 2138
Joined: Mon Jun 30, 2003 12:32 pm
Location: Melbourne, Australia
Contact:

Postby DataMystic Support » Wed May 19, 2004 1:55 pm

Hi Bob,

I guess the obvious question is- what is your EasyPattern?

And what perl regex did EPHelper convert it to? Are you using v1.3?
Regards,

Simon Carter, http://DataMystic.com/forums/index.php
http://PredictBGL.com - Insulin dose calculator for Type 1 diabetes
http://DownloadPipe.com - 250,000 free software downloads
http://DetachPipe.com - send huge email attachments

Guest

Postby Guest » Thu May 20, 2004 12:31 am

Are you using v1.3?


No, I was on 1.1 - got the 1,3 update e-mail this morning.

Using 1.3 I got it to work OK . . .

Code: Select all

// $Id:[(oneOrMore chars)1]$
worked like a dream.

Bob[/quote]

User avatar
DataMystic Support
Site Admin
Posts: 2138
Joined: Mon Jun 30, 2003 12:32 pm
Location: Melbourne, Australia
Contact:

Postby DataMystic Support » Thu May 20, 2004 9:48 am

Great! The handling of [char] was broken in v1.1.

You can also capture text in a more natural way using

Code: Select all

// $Id:[capture(oneOrMore chars)]$


rather than using ()1
Regards,

Simon Carter, http://DataMystic.com/forums/index.php
http://PredictBGL.com - Insulin dose calculator for Type 1 diabetes
http://DownloadPipe.com - 250,000 free software downloads
http://DetachPipe.com - send huge email attachments


Return to “EasyPatterns Support”

Who is online

Users browsing this forum: No registered users and 3 guests