Hello,
I have been playing Regex in PHP for 2 days, It is full of bugs.
For example:
I can’t get regex to delete all the words after the #: sign in the following text.
I have tried:
$data = str_replace($regex,“”,$data);
with regex =
#:.*
#: .*
and about 10 obvious combinations…
If i want to replace just "#: " it’s fine, but to replace any words in the same line, it’s impossible. i used RegExr too.
# uc_stock.install,v 1.6.2.8 2009/07/21 14:37:17 islandusurper
# uc_store.install,v 1.9.2.6 2009/05/07 20:52:28 islandusurper
# uc_store.install,v 1.9.2.7 2009/07/21 14:37:21 islandusurper
# uc_store.install,v 1.9.2.8 2009/10/21 19:40:27 islandusurper
# ubercart/uc_store/includes/uc_price.inc: n/a
# uc_price.inc,v 1.1.2.5 2009/08/17 21:27:55 islandusurper
#
"POT-Creation-Date: 2009-12-27 22:59+0000\
"
"Content-Transfer-Encoding: 8bit\
"
"Plural-Forms: nplurals=2; plural=(n>1);\
"
#: <<<<<<<(((((((((((((uc_cart/uc_cart.module:621,795,1176,621,795,1176,621,795,1176; uc_catalog/uc_catalog.module:167,1186,210,781,217,797,217,797,217,797,167,1171,224,804,224,804,224,804,167,1171,224,804
msgid "Home"
msgstr "Accueil"
#: shipping/uc_flatrate/uc_flatrate.module:219,219,219; shipping/uc_shipping/uc_shipping.module:307,493,307,493,307,493; uc_order/uc_order_order_pane.inc:409,409,409; uc_order/uc_order.module:924,959,730,742,742,742,924,959,747,747,738,924,959,738; uc_roles/uc_roles.module:794,1017,998,998,998,794,1032,1032,1032,794,1032; uc_store/uc_store.module:564,1627,2551,731,1572,755,1630,755,1630,755,1630,564,1627,2559,774,1641,774,1641,774,1641,564,1627,2559,774,1641; ca/ca.admin.inc:48,60,152,373,718,50,62,156,391,779,50,62,156,391,779,50,62,156,391,779,50,62,156,391,779,50,62,156,391,779,50,62,156,391,779,50,62,156,391,779; ca/ca.ca.inc:248,263,263,263,263,263,263,263; shipping/uc_flatrate/uc_flatrate.admin.inc:38,35,35,35,35,35,35,35; shipping/uc_shipping/uc_shipping.admin.inc:137,295,138,296,138,296,138,296,138,296,138,296,138,296,138,296; uc_order/uc_order.admin.inc:342,361,361,361,361,361,361,361; uc_order/uc_order.order_pane.inc:421,421,421,421,421,421,421,421; uc_store/uc_store.admin.inc:44,46,46,46,46,46,46,46; shipping/uc_weightquote/uc_weightquote.admin.inc:38,38,38,38,38,38,38; shipping/uc_weightquote/uc_weightquote.module:222,222
msgid "Title"
msgstr ""