# How to write a Yang pattern statement correctly using the following regex:

**URL:** <https://dmap-community.ductus.global/t/how-to-write-a-yang-pattern-statement-correctly-using-the-following-regex/3590>\
**Category:** YANG\
**Created:** [April 12, 2021, 1:42pm UTC](https://dmap-community.ductus.global/t/how-to-write-a-yang-pattern-statement-correctly-using-the-following-regex/3590 "2021-04-12T13:42:22Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![sushil](https://avatars.discourse-cdn.com/v4/letter/s/e19adc/32.png) [@sushil](https://dmap-community.ductus.global/u/sushil)\
**Post date:** [April 12, 2021, 1:42pm UTC](https://dmap-community.ductus.global/t/how-to-write-a-yang-pattern-statement-correctly-using-the-following-regex/3590/1 "2021-04-12T13:42:22Z")

</div>

pattern “[’(’| ‘)’|’\<’|’\>’|’@’|’,’|’;’|’:’|’/’|’=’|’{’|’}’|’?’|’[’|’]'SP|HT]”  
SP and HT is not working others are working fine.

---

<div class="post-metadata">

**Author:** ![cohult](https://yyz2.discourse-cdn.com/flex010/user_avatar/dmap-community.ductus.global/cohult/32/221_2.png) [@cohult](https://dmap-community.ductus.global/u/cohult)\
**Post date:** [April 13, 2021, 4:32am UTC](https://dmap-community.ductus.global/t/how-to-write-a-yang-pattern-statement-correctly-using-the-following-regex/3590/2 "2021-04-13T04:32:07Z")

</div>

See this post [Yang regex spaces](http://dmap-community.ductus.global/t/yang-regex-spaces/2799/2) on that topic.
