?php
$str = 'I\'m a text: =match1 =match2=match3=match4 =nomatch{}
=match5=match6';
//$rex = /=[A-z]+/; // works but not exclude =nomatch{}
$rex = /=[A-z0-9]+(\s|=)/; //
$N = preg_match_all($rex,$str,$out);
print $N. $str\n;
print_r($out);
?
Sorry for OT. I have a little
On 10/18/2007 08:05 AM, Andrea Ganduglia wrote:
?php
$str = 'I\'m a text: =match1 =match2=match3=match4 =nomatch{}
=match5=match6';
[...]
Use grep to remove the unwanted match like so (watch out for wrapping):
?php
$str = 'I\'m a text: =match1 =match2=match3=match4 =nomatch{}
On Thu, Oct 18, 2007 at 15:05:18 +0200, Andrea Ganduglia wrote:
?php
$str = 'I\'m a text: =match1 =match2=match3=match4 =nomatch{}
=match5=match6';
//$rex = /=[A-z]+/; // works but not exclude =nomatch{}
$rex = /=[A-z0-9]+(\s|=)/; //
$N = preg_match_all($rex,$str,$out);
On 08/21/2007 07:41 AM, Tony Heal wrote:
the list is a list of files by version. I need to keep the last 5 versions.
Jeff's code works fine except I am getting some empty strings at the beginning
that I have not figured out.
Here is what I have so far. Lines 34 and 39 are provide a print out
On 08/21/2007 04:29 PM, Mumia W. wrote:
Sort::Maker should make short work for this task ;-)
[...]
Sorry, I sent this to the wrong list :-(
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
---BeginMessage---
Hi debian-users,
I am translating an O'Reilly book to French and the source code is in
FrameMaker format. The textual part is already translated but I still
have to translate the index entries. I have to be consistent and to
always use the same words across the document. As
Try this:
#!/usr/bin/perl
for () {
s!\{_(Start|End)Range_\}!!;
while (s!\{_Index\s+([^}]+)\s+_\}!!) { print %s/$1//g\n }
}
HTH,
Alex.
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
On Fri, Dec 10, 2004 at 01:58:04PM +0100, Francois Cerbelle wrote:
My source file looks like :
Text {_Index blabla:we _} bla {_Index {_StartRange_} bla _} bla
vla
stuff
bbgfd {_Index {_EndRange_} bla _}
Le Fri, Dec 10, 2004 at 04:47:56PM +0100, Maurits van Rees ecrit :
I've never been called a regex expert, but I hope this code does the
trick.
---end quoted text / fin de citation---
Thanks a lot, I had another answer with a perl program which fits my
needs. Anyway, I'll keep your code, it
Le Fri, Dec 10, 2004 at 07:15:50AM -0800, Alex Barylo ecrit :
#!/usr/bin/perl
for () {
s!\{_(Start|End)Range_\}!!;
while (s!\{_Index\s+([^}]+)\s+_\}!!) { print %s/$1//g\n }
}
---end quoted text / fin de citation---
I already had something similar on another list. But thanks you for
helping
10 matches
Mail list logo