# Regex hack to indent your UPROPERTY / UFUNCTION decarations!

**URL:** <https://forums.unrealengine.com/t/regex-hack-to-indent-your-uproperty-ufunction-decarations/131402>\
**Category:** Community & Industry Discussion\
**Tags:** unreal-engine\
**Created:** [September 21, 2019, 6:33pm UTC](https://forums.unrealengine.com/t/regex-hack-to-indent-your-uproperty-ufunction-decarations/131402 "2019-09-21T18:33:49Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![metablaster](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/metablaster/32/631348_2.png) [@metablaster](https://forums.unrealengine.com/u/metablaster)\
**Post date:** [September 21, 2019, 6:33pm UTC](https://forums.unrealengine.com/t/regex-hack-to-indent-your-uproperty-ufunction-decarations/131402/1 "2019-09-21T18:33:49Z")

</div>

I recently proposed in VAX forums to implement indentation of UPROPERTY / UFUNCTION decaration variables and functions.  
The proposal seems to be added to the list for consideration, but in addition the guys there told me how to do a regex search and replace to fix your indentation.

Basically just type your code and do not indent anything manually, when you’re done editing code just hit CTRL +F and search replace with regex:  
Find - [FONT=Courier New]^( ]+)((UFUNCTION|UPROPERTY)(.\*)  
( ])+(\w)  
Replace - [FONT=Courier New]$1$2  
$1$5

Original thread is [here](https://forums.wholetomato.com/forum/topic.asp?TOPIC_ID=16718)
