Regex (replace)
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
I would like to use regex to identify all rows that contain BRA (including the registers w/ numbers) - I used the expression: ^BRA*
I would like to replace all BRA derivations (including the registers w/ numbers) w/ only BRA. However it is not working.
Could you help me?
Solved! Go to Solution.
- Labels:
- Regex
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Maybe I misunderstand your intent, but if you already identify the rows with BRA something, and want just to leave the "BRA" letters instead of the whole string, then why not do it through an easy formula:
IF Contains([Name], "BRA") THEN 'BRA' ELSE Null() ENDIF
OR:
IF REGEX_CountMatches([Name], 'BRA') THEN 'BRA' ELSE Null() ENDIF
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
i like your first function (contains) , But if BRA is always at the beginning @FilipR , you can use:
left([field],3) = "BRA"
or
startswith([field],"BRA")
as part of an IIF EXPRESSION
IIF(left([field],3) = "BRA","BRA",[field])
cheers,
mark
Chaos reigns within. Repent, reflect and restart. Order shall return.
Please Subscribe to my youTube channel.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
It can be. It works! I did not know the formula/expression to do it.
Do you know a guide to test or simulate the formulas/expressions to help on learning process?
Thanks !!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Thanks!! It works also!!
Do you know a guide to help on learning expressions/formulas?
Thanks again!
