Tuesday, February 25, 2020

Regex Match And Not Match


Tutorial ini digunakan untuk mengeliminasi data dengan baris baru, ada contoh kasus dimana saya harus mencari data dengan pola xx42bb ... regex yang saya pakai adalah 
/(?:[\r\n]+|^)xx42.*/

Kemudian jika saya ingin mencari data selain xx42bb ... maka regex yang saya pakai adalah 
/(?:[\r\n]+|^)((?!xx42).*)/

Anda dapat praktek langsung menggunakan browser Chrome dan memakai extension https://chrome.google.com/webstore/detail/chrome-regex-search/bpelaihoicobbkgmhcbikncnpacdbknn?utm_source=chrome-ntp-icon


xx42bb100000
xx40bb200000
xx42bb100000
xx40bb200000
xx42bb100000
xx40bb200000
xx42bb100000
xx40bb200000
xx42bb300000
xx40bb250000
xx42bb300000
xx40bb250000
xx42bb300000
xx40bb250000
xx42bb200000
xx40bb250000
xx42bb200000
xx40bb250000
xx42bb200000
xx40bb250000
xx42bb200000
xx40bb250000
xx42bb200000
xx40bb250000
xx42bb100000
xx40bb150000
xx42bb100000
xx40bb150000
xx42bb100000
xx40bb150000
xx42bb100000
xx40bb150000
xx42bb100000
xx40bb150000
xx42bb100000
xx40bb150000
xx42bb100000
xx40bb250000
xx42bb100000
xx40bb250000
xx42bb100000
xx40bb250000
xx42bb100000
xx40bb250000
xx42bb100000
xx40bb250000
xx42bb100000
xx40bb250000
xx42bb100000
xx40bb250000
xx42bb100000
xx40bb250000
xx42bb100000
xx40bb250000
xx42bb100000
xx40bb250000
xx42bb100000
xx40bb250000
xx42bb100000
xx40bb250000
xx42bb100000
xx40bb250000
xx42bb100000
xx40bb200000
xx42bb100000
xx40bb200000
xx42bb100000
xx40bb200000
xx42bb100000
xx40bb200000
xx42bb100000
xx40bb200000
xx42bb100000
xx40bb200000
xx42bb100000
xx40bb200000
xx42bb100000
xx40bb200000
xx42bb100000
xx40bb200000
xx42bb100000
xx40bb200000
xx42bb100000
xx40bb200000
xx42bb250000
xx40bb150000
xx42bb250000
xx40bb150000
xx40bb150000

Selamat mencoba

Post a Comment