import Foundation
let pattern = #"(?:http(s)?:\/\/(*SKIP))?(?(?<=(?::\/\/))(?:www\.)?|(?:www\.))((?:[\w-]+(?:\.[a-zA-Z0-9]{2,4}[\/?]?)))([\w\d-=+&\/]*)"#
let regex = try! NSRegularExpression(pattern: pattern)
let testString = #"""
www.regex101.com/
https://regex101.com/a
https://www.amazon.com/gp/yourstore/home/ref=topnav_ys_gw/002-2063622-5895250
<a href="http://www.regex101.com/">regex101.com/</a>
Larry is survived by his wife, Sue of Waterloo, IA; two sons, Thomas (Peggy) Weber of Oak Park, IL, Ryan (Jaylene) Weber of Waterloo, IA; one daughter, Lori (Chris) Schutte of Jesup, IA; eight grandchildren, Scarlette and Jasper; Frank, Greta, and one on the way; Kalista, William, Ruby and Phoenix; three sisters, Sharon (Dan) Hambrock, Egan, MN, Judy (Jim) Meier, Tipton, IA, Marilyn (Victor) Kies, Cedar Rapids, IA; two brothers, Donald N. (Rose) Weber of Waterloo, Gerald W. “Gerry” (Shelly) Weber, Jesup; and two sisters-in-law, Brenda Weber of Jesup and Laura Weber of Raymond.
He is preceded in death by one son, Matthew (May 18, 1983), his parents, Clarence (2002) and Darlys (2008); two sisters, Janice (1958) and LuAnn (1965); two brothers, Ronald H. Weber (2014) and Dale C. Weber (2015) and his mother-in-law, Beverly Swyers (2013).
Funeral services were 10:30 a.m., Thursday, September 21, 2017, at Immaculate Conception Catholic Church, Gilbertville, IA with Rev. Henry Huber as celebrant with Deacon Al Weber assisting. Concelebrants also included Msgr. Ralph Simington, Fr. Lloyd Reuter and Fr. Jeffrey Dole. Music was by Bobbie Schares, organist, Todd Rohlfsen, soloist and the Resurrection Choir. Burial was at St. Joseph Catholic Cemetery, Raymond, IA. Casket Bearers were, Gerry Staebell, Steve Vogel, William Youngblut, Mike Reuter, Jim Breuer, Ted Monat, Adam Delagardelle, Jeremy Schmitz and Terry Hermeier.
Visitation was at Immaculate Conception Catholic Church in Gilbertville on Wednesday from 3-7 p.m.; where there was a Knights of Columbus Rosary at 4 p.m. and Vigil service at 7p.m. Visitation continued for an hour before services Thursday also at the church. Memorials may be directed to the family for charitable donations or a charity of the donor’s choice. Online condolences may be posted at www.White-MtHope.com
Larry is survived by his wife, Sue of Waterloo, IA; two sons, Thomas (Peggy) Weber of Oak Park, IL, Ryan (Jaylene) Weber of Waterloo, IA; one daughter, Lori (Chris) Schutte of Jesup, IA; eight grandchildren, Scarlette and Jasper; Frank, Greta, and one on the way; Kalista, William, Ruby and Phoenix; three sisters, Sharon (Dan) Hambrock, Egan, MN, Judy (Jim) Meier, Tipton, IA, Marilyn (Victor) Kies, Cedar Rapids, IA; two brothers, Donald N. (Rose) Weber of Waterloo, Gerald W. “Gerry” (Shelly) Weber, Jesup; and two sisters-in-law, Brenda Weber of Jesup and Laura Weber of Raymond.
He is preceded in death by one son, Matthew (May 18, 1983), his parents, Clarence (2002) and Darlys (2008); two sisters, Janice (1958) and LuAnn (1965); two brothers, Ronald H. Weber (2014) and Dale C. Weber (2015) and his mother-in-law, Beverly Swyers (2013).
Funeral services were 10:30 a.m., Thursday, September 21, 2017, at Immaculate Conception Catholic Church, Gilbertville, IA with Rev. Henry Huber as celebrant with Deacon Al Weber assisting. Concelebrants also included Msgr. Ralph Simington, Fr. Lloyd Reuter and Fr. Jeffrey Dole. Music was by Bobbie Schares, organist, Todd Rohlfsen, soloist and the Resurrection Choir. Burial was at St. Joseph Catholic Cemetery, Raymond, IA. Casket Bearers were, Gerry Staebell, Steve Vogel, William Youngblut, Mike Reuter, Jim Breuer, Ted Monat, Adam Delagardelle, Jeremy Schmitz and Terry Hermeier.
Visitation was at Immaculate Conception Catholic Church in Gilbertville on Wednesday from 3-7 p.m.; where there was a Knights of Columbus Rosary at 4 p.m. and Vigil service at 7p.m. Visitation continued for an hour before services Thursday also at the church. Memorials may be directed to the family for charitable donations or a charity of the donor’s choice. Online condolences may be posted at www.White-MtHope.com
Larry is survived by his wife, Sue of Waterloo, IA; two sons, Thomas (Peggy) Weber of Oak Park, IL, Ryan (Jaylene) Weber of Waterloo, IA; one daughter, Lori (Chris) Schutte of Jesup, IA; eight grandchildren, Scarlette and Jasper; Frank, Greta, and one on the way; Kalista, William, Ruby and Phoenix; three sisters, Sharon (Dan) Hambrock, Egan, MN, Judy (Jim) Meier, Tipton, IA, Marilyn (Victor) Kies, Cedar Rapids, IA; two brothers, Donald N. (Rose) Weber of Waterloo, Gerald W. “Gerry” (Shelly) Weber, Jesup; and two sisters-in-law, Brenda Weber of Jesup and Laura Weber of Raymond.
He is preceded in death by one son, Matthew (May 18, 1983), his parents, Clarence (2002) and Darlys (2008); two sisters, Janice (1958) and LuAnn (1965); two brothers, Ronald H. Weber (2014) and Dale C. Weber (2015) and his mother-in-law, Beverly Swyers (2013).
Funeral services were 10:30 a.m., Thursday, September 21, 2017, at Immaculate Conception Catholic Church, Gilbertville, IA with Rev. Henry Huber as celebrant with Deacon Al Weber assisting. Concelebrants also included Msgr. Ralph Simington, Fr. Lloyd Reuter and Fr. Jeffrey Dole. Music was by Bobbie Schares, organist, Todd Rohlfsen, soloist and the Resurrection Choir. Burial was at St. Joseph Catholic Cemetery, Raymond, IA. Casket Bearers were, Gerry Staebell, Steve Vogel, William Youngblut, Mike Reuter, Jim Breuer, Ted Monat, Adam Delagardelle, Jeremy Schmitz and Terry Hermeier.
Visitation was at Immaculate Conception Catholic Church in Gilbertville on Wednesday from 3-7 p.m.; where there was a Knights of Columbus Rosary at 4 p.m. and Vigil service at 7p.m. Visitation continued for an hour before services Thursday also at the church. Memorials may be directed to the family for charitable donations or a charity of the donor’s choice. Online condolences may be posted at www.White-MtHope.com
Larry is survived by his wife, Sue of Waterloo, IA; two sons, Thomas (Peggy) Weber of Oak Park, IL, Ryan (Jaylene) Weber of Waterloo, IA; one daughter, Lori (Chris) Schutte of Jesup, IA; eight grandchildren, Scarlette and Jasper; Frank, Greta, and one on the way; Kalista, William, Ruby and Phoenix; three sisters, Sharon (Dan) Hambrock, Egan, MN, Judy (Jim) Meier, Tipton, IA, Marilyn (Victor) Kies, Cedar Rapids, IA; two brothers, Donald N. (Rose) Weber of Waterloo, Gerald W. “Gerry” (Shelly) Weber, Jesup; and two sisters-in-law, Brenda Weber of Jesup and Laura Weber of Raymond.
He is preceded in death by one son, Matthew (May 18, 1983), his parents, Clarence (2002) and Darlys (2008); two sisters, Janice (1958) and LuAnn (1965); two brothers, Ronald H. Weber (2014) and Dale C. Weber (2015) and his mother-in-law, Beverly Swyers (2013).
Funeral services were 10:30 a.m., Thursday, September 21, 2017, at Immaculate Conception Catholic Church, Gilbertville, IA with Rev. Henry Huber as celebrant with Deacon Al Weber assisting. Concelebrants also included Msgr. Ralph Simington, Fr. Lloyd Reuter and Fr. Jeffrey Dole. Music was by Bobbie Schares, organist, Todd Rohlfsen, soloist and the Resurrection Choir. Burial was at St. Joseph Catholic Cemetery, Raymond, IA. Casket Bearers were, Gerry Staebell, Steve Vogel, William Youngblut, Mike Reuter, Jim Breuer, Ted Monat, Adam Delagardelle, Jeremy Schmitz and Terry Hermeier.
Visitation was at Immaculate Conception Catholic Church in Gilbertville on Wednesday from 3-7 p.m.; where there was a Knights of Columbus Rosary at 4 p.m. and Vigil service at 7p.m. Visitation continued for an hour before services Thursday also at the church. Memorials may be directed to the family for charitable donations or a charity of the donor’s choice. Online condolences may be posted at www.White-MtHope.com
Larry is survived by his wife, Sue of Waterloo, IA; two sons, Thomas (Peggy) Weber of Oak Park, IL, Ryan (Jaylene) Weber of Waterloo, IA; one daughter, Lori (Chris) Schutte of Jesup, IA; eight grandchildren, Scarlette and Jasper; Frank, Greta, and one on the way; Kalista, William, Ruby and Phoenix; three sisters, Sharon (Dan) Hambrock, Egan, MN, Judy (Jim) Meier, Tipton, IA, Marilyn (Victor) Kies, Cedar Rapids, IA; two brothers, Donald N. (Rose) Weber of Waterloo, Gerald W. “Gerry” (Shelly) Weber, Jesup; and two sisters-in-law, Brenda Weber of Jesup and Laura Weber of Raymond.
He is preceded in death by one son, Matthew (May 18, 1983), his parents, Clarence (2002) and Darlys (2008); two sisters, Janice (1958) and LuAnn (1965); two brothers, Ronald H. Weber (2014) and Dale C. Weber (2015) and his mother-in-law, Beverly Swyers (2013).
Funeral services were 10:30 a.m., Thursday, September 21, 2017, at Immaculate Conception Catholic Church, Gilbertville, IA with Rev. Henry Huber as celebrant with Deacon Al Weber assisting. Concelebrants also included Msgr. Ralph Simington, Fr. Lloyd Reuter and Fr. Jeffrey Dole. Music was by Bobbie Schares, organist, Todd Rohlfsen, soloist and the Resurrection Choir. Burial was at St. Joseph Catholic Cemetery, Raymond, IA. Casket Bearers were, Gerry Staebell, Steve Vogel, William Youngblut, Mike Reuter, Jim Breuer, Ted Monat, Adam Delagardelle, Jeremy Schmitz and Terry Hermeier.
Visitation was at Immaculate Conception Catholic Church in Gilbertville on Wednesday from 3-7 p.m.; where there was a Knights of Columbus Rosary at 4 p.m. and Vigil service at 7p.m. Visitation continued for an hour before services Thursday also at the church. Memorials may be directed to the family for charitable donations or a charity of the donor’s choice. Online condolences may be posted at
L
"""#
let stringRange = NSRange(location: 0, length: testString.utf16.count)
let substitutionString = #"<a href="http\1://\0">\2</a>"#
let result = regex.stringByReplacingMatches(in: testString, range: stringRange, withTemplate: substitutionString)
print(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 Swift 5.2, please visit: https://developer.apple.com/documentation/foundation/nsregularexpression