// include the latest version of the regex crate in your Cargo.toml
extern crate regex;
use regex::Regex;
fn main() {
let regex = Regex::new(r"\/\*(.|\n|\r)*\*\/").unwrap();
let string = "
package es.elcorteingles.ns.integrations.schema.omnistoreordernotification._2_0;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlType;
/**
* Contiene informacion del coste a nivel de
* ShippingGroup.
* - Importe total.
* - Importe pendiente a cobrar.
* - Importe
* del gasto de envÃo
*
*
* <p>Java class for ShippingGroupPriceInfoType complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType name=\"ShippingGroupPriceInfoType\">
* <complexContent>
* <restriction base=\"{http://www.w3.org/2001/XMLSchema}anyType\">
* <sequence>
* <element name=\"totalCost\" type=\"{http://www.elcorteingles.es/ns/integrations/schema/OmniStoreOrderNotification/2_0}AmountType\" minOccurs=\"0\"/>
* <element name=\"pendingCost\" type=\"{http://www.elcorteingles.es/ns/integrations/schema/OmniStoreOrderNotification/2_0}AmountType\" minOccurs=\"0\"/>
* <element name=\"shippingCost\" type=\"{http://www.elcorteingles.es/ns/integrations/schema/OmniStoreOrderNotification/2_0}AmountType\" minOccurs=\"0\"/>
* <element name=\"groupDiscountsAmount\" type=\"{http://www.elcorteingles.es/ns/integrations/schema/OmniStoreOrderNotification/2_0}AmountType\" minOccurs=\"0\"/>
* <element name=\"totalNetAmount\" type=\"{http://www.elcorteingles.es/ns/integrations/schema/OmniStoreOrderNotification/2_0}AmountType\" minOccurs=\"0\"/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = \"ShippingGroupPriceInfoType\", propOrder = {
\"totalCost\",
\"pendingCost\",
\"shippingCost\",
\"groupDiscountsAmount\",
\"totalNetAmount\"
})
public class ShippingGroupPriceInfoType {
protected AmountType totalCost;
protected AmountType pendingCost;
protected AmountType shippingCost;
protected AmountType groupDiscountsAmount;
protected AmountType totalNetAmount;
/**
* Gets the value of the totalCost property.
*
* @return
* possible object is
* {@link AmountType }
*
*/
public AmountType getTotalCost() {
return totalCost;
}
/**
* Sets the value of the totalCost property.
*
* @param value
* allowed object is
* {@link AmountType }
*
*/
public void setTotalCost(AmountType value) {
this.totalCost = value;
}
/**
* Gets the value of the pendingCost property.
*
* @return
* possible object is
* {@link AmountType }
*
*/
public AmountType getPendingCost() {
return pendingCost;
}
/**
* Sets the value of the pendingCost property.
*
* @param value
* allowed object is
* {@link AmountType }
*
*/
public void setPendingCost(AmountType value) {
this.pendingCost = value;
}
/**
* Gets the value of the shippingCost property.
*
* @return
* possible object is
* {@link AmountType }
*
*/
public AmountType getShippingCost() {
return shippingCost;
}
/**
* Sets the value of the shippingCost property.
*
* @param value
* allowed object is
* {@link AmountType }
*
*/
public void setShippingCost(AmountType value) {
this.shippingCost = value;
}
/**
* Gets the value of the groupDiscountsAmount property.
*
* @return
* possible object is
* {@link AmountType }
*
*/
public AmountType getGroupDiscountsAmount() {
return groupDiscountsAmount;
}
/**
* Sets the value of the groupDiscountsAmount property.
*
* @param value
* allowed object is
* {@link AmountType }
*
*/
public void setGroupDiscountsAmount(AmountType value) {
this.groupDiscountsAmount = value;
}
/**
* Gets the value of the totalNetAmount property.
*
* @return
* possible object is
* {@link AmountType }
*
*/
public AmountType getTotalNetAmount() {
return totalNetAmount;
}
/**
* Sets the value of the totalNetAmount property.
*
* @param value
* allowed object is
* {@link AmountType }
*
*/
public void setTotalNetAmount(AmountType value) {
this.totalNetAmount = value;
}
}
";
let substitution = "";
// result will be a String with the substituted value
let result = regex.replace(string, substitution);
println!("{}", result);
}
Please keep in mind that these code samples are automatically generated and are not guaranteed to work. If you find any syntax errors, feel free to submit a bug report. For a full regex reference for Rust, please visit: https://docs.rs/regex/latest/regex/