On Thu, Oct 18, 2007 at 15:05:18 +0200, Andrea Ganduglia wrote:
> $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 10/18/2007 08:05 AM, Andrea Ganduglia wrote:
Use grep to remove the unwanted match like so (watch out for wrapping):
$str = 'I\'m a text: =match1 =match2=match3=match4 =nomatch{}
=match5=match6';
$rex = "/=[A-z0-9]+/";
$N = preg_match_all($rex,$str,$out);
$out[0] = preg_gr
Sorry for OT. I have a little problem with regex above. The script is
in PHP, but regex should be compatible with Perl.
I want match =[A-z0-9] where char after this is \s or =, final = is
the start char of next match. How can go back after first matching?
The result of the script
Array
(
[0
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]
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 f
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
h
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
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 _}
> -
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]
--- Begin Message ---
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 t
10 matches
Mail list logo