regex - Conditionals usage -


please elucidate me such issue : how can apply pattern input string depending on other pattern match? example, lalalala hedcbw lulu pol gdte. if pol occurs @ place of string subpattern ,say la{2}, applied string.

see this example @ regex101, if that's mean:

^(?(?=.*\bpol).*?(la{2})|.*?(lu{2})) 

if conditon matches - check @ start: amount of characters, followed \b word-boundary, follwed pol, first pattern used, else second.

read more conditionals.


Comments

Popular posts from this blog

java - How to specify maven bin in eclipse maven plugin? -

Error while updating a record in APEX screen -

c++ - In an add-in in Excel, written in C(++), how does one get the name of the function which called into the addin? -