After using lookbehind in regex replace the ouput with a value -
i'm trying replace output of regex value. seems run first regex.
what have:
(?<=\bstatus:|inhoud:\s1\sstuk\s)(\w+)
in piece of text there 2 possibilities; word matching "status:" , word matching "inhoud: 1 stuk". output of running regex 1 first scenario , "dit" second.
when second scenario ("inhoud: 1 stuk") output "dit" true want replace "dit" 0.
first scenario example input:
oogpotlood (127) oogschaduw (380) staalwaren (8) wenkbrauw (49) 1 bourjois concealer healthy mix eclat clari 051 verbergt onvolmaaktheden op een natuurlijke wijze. inhoud: 1 stuk status: 25 verzenden € 10.85
ouput is:
25
second scenario example input:
nepwimpers (10) oogpotlood (127) oogschaduw (380) staalwaren (8) wenkbrauw (49) 1 bourjois concealer healthy mix eclat clari 051 verbergt onvolmaaktheden op een natuurlijke wijze. inhoud: 1 stuk dit product op dit moment niet op voorraad, je kunt het product niet bestellen. stuur mij een e-mail als dit product weer op voorraad is
ouput is:
dit
so want replace dit 0.
how do that?
seems me want find this
inhoud: 1 stuk dit
and replace with
inhoud: 0 stuk dit
no regex needed.
Comments
Post a Comment