Jump to content
UBot Underground

Recommended Posts

Im trying to replace a blank line with N/A using ^\n which i got from RegexBuddy.  Thanks for your help.

 

Code

set(#text1,"Bill Gates
Microsoft
3 Park Plaza

Irvine, California 92614
United States
3105551212


","Global")
set(#text2,$replace regular expression(#text1,"^\\n","N/A"),"Global")

Snapshot

post-9583-0-72786800-1556995537_thumb.jpg

Link to post
Share on other sites

 

Try this regex:

\n\s

 

Thanks.  But it didnt work.  It grabbed all the line feeds at the end of the lines and replaced them with N/A. I tried putting a ^ in the front of your code and it didnt do anything.  

 

Result

Bill Gates
Microsoft
3 Park PlazaN/AIrvine, California 92614
United States
3105551212N/A



Link to post
Share on other sites

 

Try this regex:

\n\s

 

 

Ok so used your code and then modified the replace field by putting a NEW LINE Command in front of N/A and Behind the N/A.  Thank you :)

 

Code

set(#text1,"Bill Gates
Microsoft
3 Park Plaza

Irvine, California 92614
United States
3105551212


","Global")
set(#text2,$replace regular expression(#text1,"\\n\\s","{$new line}N/A{$new line}"),"Global")

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...