# How to keep region number after 'extractborder'

**URL:** <https://community.freefem.org/t/how-to-keep-region-number-after-extractborder/3718>\
**Category:** General Discussion\
**Created:** [January 30, 2025, 7:52pm UTC](https://community.freefem.org/t/how-to-keep-region-number-after-extractborder/3718 "2025-01-30T19:52:48Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![zxss](https://avatars.discourse-cdn.com/v4/letter/z/bc8723/32.png) [@zxss](https://community.freefem.org/u/zxss)\
**Post date:** [January 30, 2025, 7:52pm UTC](https://community.freefem.org/t/how-to-keep-region-number-after-extractborder/3718/1 "2025-01-30T19:52:48Z")

</div>

Dear all,

I use the command ‘extractborder’ to remesh, but the region number changes, is there a method to keep the region number.  
This is my code  
[try3.edp](https://community.freefem.org/uploads/short-url/fCkjUv9YiRo5SFB2YqOc7RU8j62.edp) (1.4 KB)  
The initial region number is 0 1 3,  
but after remeshing, it becomes 0 1 2
