Thread RegEx Problem (13 answers)
Opened by Gast at 2006-12-01 16:06

bloonix
 2006-12-01 16:43
#72143 #72143
User since
2005-12-17
1615 Artikel
HausmeisterIn
[Homepage]
user image
[quote=Guest,01.12.2006, 15:06]Ich bräuchte dann folgende Ausgabe:
Code: (dl )
1
2
3
4
bla bla and
table.column
'in''ha''lt'
and bla bla bla
[/quote]
Also bei mir ist die Ausgabe genauso wie du Sie brauchst, ohne das ich
deine Regex verändert habe!

Code: (dl )
1
2
3
4
5
6
7
8
9
10
11
12
13
use strict;
use warnings;

my $a = "bla bla and table.column like 'inhalt' and bla bla bla";
my $b = "bla bla and table.column like 'in''ha''lt' and bla bla bla";

my @a = $a =~ /^(.*?)([\w.]*) like ('.*')(.*)$/;
print join("\n", @a), "\n";

print "-------------------------------------------\n";

my @b = $b =~ /^(.*?)([\w.]*) like ('.*')(.*)$/;
print join("\n", @b), "\n";


bla bla and
table.column
'inhalt'
and bla bla bla
-------------------------------------------
bla bla and
table.column
'in''ha''lt'
and bla bla bla


Scheint ja also alles ok zu sein? Oder? :)\n\n

<!--EDIT|opi|1164984313-->
What is a good module? That's hard to say.
What is good code? That's also hard to say.
One man's Thing of Beauty is another's man's Evil Hack.

View full thread RegEx Problem